PHP 4.0 Bug #8524 Updated: Segmentation fault
| From: | sniper@php.net | Date: | Wed, 03 Jan 2001 11:41:02 +0000 |
| Subject: | PHP 4.0 Bug #8524 Updated: Segmentation fault | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42795@lists.php.net to get a copy of this message | ||
ID: 8524
Updated by: sniper
Reported By: msopacua@idg.nl
Old-Status: Open
Status: Closed
Bug Type: XML related
Assigned To:
Comments:
Fixed -> closed. (and that mod_php4.c is fixed now too, thanks!)
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-01-03 05:53:30] msopacua@idg.nl
The latest snapshot, won't compile, here's the fix:
Compile error:
mod_php4.c: In function `php_apache_startup':
mod_php4.c:252: too many arguments to function `php_module_startup'
mod_php4.c: At top level:
mod_php4.c:354: warning: initialization from incompatible pointer type
make[3]: *** [mod_php4.lo] Error 1
make[3]: Leaving directory _src/php4-200101030145/sapi/apache'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory _src/php4-200101030145/sapi/apache'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory _src/php4-200101030145/sapi'
make: *** [all-recursive] Error 1
FIX:
$ diff sapi/apache/mod_php4.c sapi/apache/mod_php4.c.old
252,253c252
< /* too many arguments fix: if(php_module_startup(sapi_module, NULL) == FAILURE */
< if(php_module_startup(sapi_module) == FAILURE
---
> if(php_module_startup(sapi_module, NULL) == FAILURE
The XML bug is fixed though!
Thanx!
---------------------------------------------------------------------------
[2001-01-02 20:17:28] sniper@php.net
I tried the latest CVS and it doesn't crash.
Please try the latest CVS snapshot from http://snaps.php.net/
--Jani
---------------------------------------------------------------------------
[2001-01-02 15:26:10] msopacua@idg.nl
Reporting back:
php 4.0.3pl1 doesn't expose this error, under the same chrooted environment, with the same
server-software.
---------------------------------------------------------------------------
[2001-01-02 15:03:48] msopacua@idg.nl
First of all:
Best wishes to you all!
Now for the annoying stuff:
This bug seems similar to 8492.
Offending code, remove the /* */ and it core-dumps:
$xml_file='bla.xml';
if (!(list($xml_parser, $fp) = new_xml_parser($xml_file))) {
die("could not open XML input");
}
print "<pre>";
while ($data = fread($fp, 4096)) {
/* if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("<span style='color: red; font-weight: bold'>XML error: %s at line
%d</span>n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}*/
echo $data;
}
print "</pre>";
xml_parser_free($xml_parser);
Output BSDi gdb backtrace:
Program terminated with signal 11, Segmentation fault.
#0 0x48253c7b in zend_hash_exists (ht=0x816273c, arKey=0x8047d0c "