ID:               25620
 Updated by:       [EMAIL PROTECTED]
 Reported By:      xris at farcaster dot net
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: GNU/Linux 2.4.20
 PHP Version:      4.3.3
 New Comment:

It should be a relatively simple fix.  I am about to get on a plane,
but I will have a look when I get a chance.  I have a feeling that now
that we think we know there is a string somewhere in gettext not
getting null-terminated someone will jump in and find it before me.


Previous Comments:
------------------------------------------------------------------------

[2003-09-21 18:58:51] xris at farcaster dot net

Good guess. A 4.3.3 without Gettext doesn't show the symptoms.
How to proceed next? ... i wouldn't be too fond of the idea
having to reimplement _() in php ...

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

[2003-09-21 16:31:25] [EMAIL PROTECTED]

I doubt it is mysql.  Too many others would have hit it.
GD doesn't tend to work with strings very much outside of the font
stuff.  My initial guess is that it is a problem in the gettext
extension as that is the least used out of the ones you list.  Any
chance you could test without gettext() ?

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

[2003-09-21 16:12:18] xris at farcaster dot net

I know that my previous code example would run fine, if being isolated
- i just don't know how to home in on the error ..

The system is really quite big, for every page are about 40.000 method
calls, using classes from hundreds of files
(php is really fast ...). The class-framework is highly
dependent on each of its parts, so its almost impossible
to (easily) only use a simple part of it.

The only extension we use are mysql, gd, gettext and pcre.

I could try removing mysql/gd calls to see if the problem
persist, though.

Most of the pages work just fine; i cannot identify 
anything special about this specific page.

As i already mentioned, i encountered this problem some
time ago, but was able to work around it by restructuring
some parts of the code, so i have a feeling like it might
be some kind of garbage collection / memory management 
problem.

Thanks for your efforts- i really have no idea on how to
isolate the problem .. i could strip down the system and
surely get to a point where the page will work again, but
like my previous code example showed, i might not find
the real source of the error. Any help on how to proceed
would be great.

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

[2003-09-21 15:30:32] [EMAIL PROTECTED]

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?

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

[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?

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/25620

-- 
Edit this bug report at http://bugs.php.net/?id=25620&edit=1

Reply via email to