You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Shevek <sh...@tirin.openworld.co.uk> on 2000/03/24 22:17:42 UTC
More segfault problems
Let's make a nice DOM tree:
28 my $parser = new XML::DOM::Parser;
29
30 open(INPUT, $file) or return FORBIDDEN;
31 my $document = $parser->parse(*INPUT);
32 close(INPUT);
Now we make a data dumper of it, and mess with it.
34 my $d = Data::Dumper->new( [ $document ] );
35 $d->Indent(1);
36 print $d->Dump() . "\n";
Now we get rid of the DOM tree.
44 $document->dispose;
And the child segfaults. But if I don't have the dumper, that does not
happen. What is the best way to get around this? Is undefining $d an
appropriate technique?
Ta.
S.
--
Shevek
GM/CS/MU -d+ H+>++ s+: !g p2 au0 !a w+++ v-(---) C++++$ UL++++$ UB+
US+++$ UI+++$ P++>++++ L++++$ 3+ E--- N K- !W(-----) M(-) !V -po+ Y+
t+ 5++ !j !R G' !tv b+++ D++ B--- e+ u+* h++ f? r++ n---- y?
Recent UH+>++ UO+ UC++ U?+++ UV++ and collecting.
Re: More segfault problems
Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 29 Mar 2000, Shevek wrote:
> I can't find any documentation for what RULE_EXPAT does, the only
> occurrence at all is in Apache src/Configure, where it seels to compile in
> the expat lite library.
RULE_EXPAT=no disables the expat lite library. there have been reports of
it clashing with symbols in XML::Parser
Re: More segfault problems
Posted by Shevek <sh...@tirin.openworld.co.uk>.
I configured on the quick and dirty with
DO_HTTPD=1 APACHE_SRC=/usr/local/src/apache_1.3.12 USE_APACI=1
PREP_HTTPD=1
I can't find any documentation for what RULE_EXPAT does, the only
occurrence at all is in Apache src/Configure, where it seels to compile in
the expat lite library.
I have since developed the code quite a way past that segfault, although I
have had several more reproducible ones, mostly related to some particular
feature ofmy Perl.
S.
On Tue, 28 Mar 2000, Doug MacEachern wrote:
> On Fri, 24 Mar 2000, Shevek wrote:
>
> > Now we get rid of the DOM tree.
> >
> > 44 $document->dispose;
> >
> > And the child segfaults. But if I don't have the dumper, that does not
> > happen. What is the best way to get around this? Is undefining $d an
> > appropriate technique?
>
>
> did you configure apache with RULE_EXPAT=no ?
>
--
Shevek
GM/CS/MU -d+ H+>++ s+: !g p2 au0 !a w+++ v-(---) C++++$ UL++++$ UB+
US+++$ UI+++$ P++>++++ L++++$ 3+ E--- N K- !W(-----) M(-) !V -po+ Y+
t+ 5++ !j !R G' !tv b+++ D++ B--- e+ u+* h++ f? r++ n---- y?
Recent UH+>++ UO+ UC++ U?+++ UV++ and collecting.
Re: More segfault problems
Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 24 Mar 2000, Shevek wrote:
> Now we get rid of the DOM tree.
>
> 44 $document->dispose;
>
> And the child segfaults. But if I don't have the dumper, that does not
> happen. What is the best way to get around this? Is undefining $d an
> appropriate technique?
did you configure apache with RULE_EXPAT=no ?
Re: More segfault problems
Posted by Matt Carothers <ma...@telepath.com>.
On Fri, 24 Mar 2000, Shevek wrote:
> Let's make a nice DOM tree:
>
> 28 my $parser = new XML::DOM::Parser;
> 29
> 30 open(INPUT, $file) or return FORBIDDEN;
This doesn't relate to the segfaulting problem, but if you're going
to use perl's magic open(), you should explicitly use a "<." i.e.,
open(INPUT, "<$file"). Otherwise you run the risk of a malicious user
executing programs by feeding the script a filename that begins with '|' or
truncating files with a ">."
- Matt