[ expat-Bugs-453546 ] memmove() segv inside XML_GetBuffer (mod_perl)

noreply@sourceforge.net noreply@sourceforge.net
Tue Jun 25 20:10:02 2002


Bugs item #453546, was opened at 2001-08-20 19:42
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=453546&group_id=10127

Category: XML::Parser (Perl module)
>Group: Third-party Bug
>Status: Closed
>Resolution: Out of Date
Priority: 2
Submitted By: Bart Schaefer (barts)
Assigned to: Nobody/Anonymous (nobody)
Summary: memmove() segv inside XML_GetBuffer (mod_perl)

Initial Comment:
I do not believe this to be the same bug as 434665.

I'm using XML::Parser::EasyTree.

I wrote a module that, when perl is run from the shell
command line, successfully parses an XML file and
interprets the resulting tree.

When I use the same module as a mod_perl handler for an
upload of exactly the same file, I get a segmentation
fault.  GDB on a single-threaded httpd shows this to be
happening on a memmove() call with dest=0x0, *inside*
XML_GetBuffer().
The fix in xmlparse.c rev 1.22 only helps after
XML_GetBuffer() returns 0, and I don't get that far.

I'm using the 1.95.2-1 RPM on RedHat 6.2 linux, with
perl 5.6.0 and XML::Parser both installed using the
CPAN shell.  I've tried it on two different machines
with Apache 1.3.14/ mod_perl 1.24_01 and Apache
1.3.19/mod_perl 1.25, with the same results.

If I can come up with a minimal file that reproduces
this, I'll attach it to this bug report later.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-06-25 23:09

Message:
Logged In: YES 
user_id=3066

Closed due to non-response of the submitter.  This appears
to be the classic Apache/mod_perl problem of two library
instances being loaded.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-05-16 22:18

Message:
Logged In: YES 
user_id=3066

Is it possible that two copies of Expat are getting loaded?
 This sounds like a classic problem with Apache and
mod_perl; using XML::Parser from mod_perl causes a new copy
of Expat to be loaded, even though there's already a copy
provided as part of Apache.  This situation has been
improved in more recent Apache versions (1.3.21 and newer).

Does the problem go away with more recent versions of Apache?

----------------------------------------------------------------------

Comment By: Bart Schaefer (barts)
Date: 2001-08-20 21:11

Message:
Logged In: YES 
user_id=22647

This appears to be a problem with use of global data that is
getting messed up by mod_perl.  I converted to a CGI script
and it works fine now.  I reduced the priority and mentioned
mod_perl in the summary.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=453546&group_id=10127