#32245 [NEW]: xml_parser_free() in a function assigned to the xml parser gives a segfault

From: Date: Wed, 09 Mar 2005 07:07:08 +0000
Subject: #32245 [NEW]: xml_parser_free() in a function assigned to the xml parser gives a segfault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-75152@lists.php.net to get a copy of this message
From: MageOfChrisz at Gmail dot com Operating system: Linux 2.6.10 PHP version: 5.0.3 PHP Bug Type: XML related Bug description: xml_parser_free() in a function assigned to the xml parser gives a segfault Description: ------------ (Most of what I say here can be found at http://chrisallan.info/segfault/) When putting "xml_parser_free" in a function assigned to the XML parser with xml_set_element_handler, Apache/PHP Gives a Segmentation Fault. The only browser that you can feasibly see it blow up, would be in lynx. In FireFox, if you're at www.google.com and type in the link to the file (http://chrisallan.info/segfault/function_example.php) it will still show google.com and fail to load the new page. A similar result occurs with Internet Explorer, but in Lynx it'll say: "Alert!: Unexpected Network read error; connection aborted;" I made a PHP5.0.4-dev build (as of Mar 09, 2005 05:30 GMT) from snaps.php.net. This was originally discovered in PHP 5.0.3, and then tested in PHP5.0.4-dev Reproduce code: --------------- You can find the code (neatly) here: http://chrisallan.info/segfault/ Expected result: ---------------- Some sort of error telling me not to do what I was doing (due to lack of sleep) or the xml resource actually being freed Actual result: -------------- Segmentation Fault -- Edit bug report at http://bugs.php.net/?id=32245&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32245&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32245&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32245&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32245&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32245&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32245&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32245&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32245&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32245&r=support Expected behavior: http://bugs.php.net/fix.php?id=32245&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32245&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32245&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32245&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32245&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32245&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32245&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32245&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32245&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32245&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32245&r=mysqlcfg

« previous php.bugs (#75152) next »