ID: 25620 Updated by: [EMAIL PROTECTED] Reported By: xris at farcaster dot net -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: GNU/Linux 2.4.20 PHP Version: 4.3.3 New Comment:
That's unlikely to be causing this. If you ran this simple code in isolation I bet you wouldn't see the error. What else is being called in the script that contains this code? Any non-standard extension calls of any sort? Previous Comments: ------------------------------------------------------------------------ [2003-09-21 14:50:07] xris at farcaster dot net Well, just as i guessed, it's very strange. I have been able to isolate a simple piece of code which influences the ocurrence of the Segfault/PHP Warning. Have a look at this code fragement from one of my classes: --- snip --- 1 var_dump( $this->mBuffer); 2 3 if ( $this->mBuffer) { 4 $Client->Buffer( TRUE ); 5 } else { 6 $Client->Buffer( FALSE ); 7 }; 8 9 $Client->Buffer( $this->mBuffer ); ---snip--- The $this->mBuffer object property holds a boolean value (checked via var_dump()). Obviously, line 8 should be equivalent to lines 3-7, but with lines 3-7 in place, the error doesn't show up, while using the statement on line 8, PHP segfaults ... Just in case you ask, the Buffer() method of the client object class is declared as: --- snip --- function Buffer( $Value = TRUE ) { $this->mBuffer = $Value; } --- snip --- How to proceed on isolating the reason for the Error? ------------------------------------------------------------------------ [2003-09-21 11:37:09] [EMAIL PROTECTED] It is natural that an unterminated string bug doesn't always cause a crash, but at the same time, it is also very much related to a specific function call somewhere. For us to have any chance of finding this you need to narrow it down for us. Start commenting out bits of code until the problem goes away, then tell us which piece of code caused it. ------------------------------------------------------------------------ [2003-09-21 11:21:36] 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? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25620&edit=1