|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-09-21 11:21 UTC] xris at farcaster dot net
Description: ------------ I run a rather large PHP System (250k+ LOC). Recently, a number of "Segmentation-Faults" started popping up in my Apache error log. Only some of the PHP pages caused a segfault. These segfaults are mostly reproducible, but could be suppressed by moving code around - like changing order of method definitions, etc. So i set up an identical system as our production server, but with --enable debug. The segfaults did not happen anymore, but i keep getting notices like these: [21-Sep-2003 16:25:34] PHP Warning: String is not zero-terminated (SetVerband??̏**rtID' aa) (source: /home/develop/mod_php-4.3.3/Zend/zend_opcode.c:165) in Unknown on line 0 The problem occurres with PHP from at least 4.2.2 to 4.3.3, regardless wether running with Apache 1.3x or Apache 2.0. I would like to provide more information, but i don't know how .. any info on how to trace the reason for this problem would greatly appreciated. Reproduce code: --------------- sorry, i'cant construct a small snippted reproducing this error - it seems to pop up on pages with a large amount of used objects, though (but thats only a guess ..) Expected result: ---------------- well, no php crash? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
I don't know if it's of any help, but i found out that the 4.3.4-dev version prints out more debug information as the 4.3.3 i initially ([21 Sep 11:21am EDT]) used (if compiled "--with-debug"), so here once again a debug output: --- snip --- Warning: String is not zero-terminated (Bundesland??̏*Z?̏*ZZZZZZZZZZZZZZZZZZZZZZ?̏*) (source: /var/tmp/portage/php-4.3.4/work/php-4.3.4/Zend/zend_opcode.c:159) in Unknown on line 0 [Fri Sep 26 15:14:21 2003] Script: 'htdocs/sport/auswahl.php' --------------------------------------- /home/develop/php-4.3.4/Zend/zend_opcode.c(159) : Block 0x424DB744 status: /home/develop/php-4.3.4/Zend/zend_variables.c(44) : Actual location (location was relayed) Beginning: OK (allocated on Zend/zend_language_scanner.c:4492, 11 bytes) End: Overflown (magic=0x2A8FCC83 instead of 0x2A8FCC84) 1 byte(s) overflown ---------------------------------------So far i checked 600 methods, but could'nt find any return's similar to your examples. What about these constructs, are they known to cause heap corruption, too? // Example 1 function &return_ref_constant() { return FALSE; // or "return (1<2):" } // Example 2 function &a() { return $b } function &return_ref_method() { return $this->a(); } // Example 3 function &return_ref_array() { return array(); } Yes, i know, some of them are "wrong".