#24842 [Opn->Csd]: Corrupted memory/segfault when using destructors
ID: 24842
Updated by: stas@php.net
Reported By: vma1 at abv dot bg
-Status: Open
+Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: Slackware Linux 9.0
PHP Version: 5CVS-2003-07-28 (dev)
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
commited that
Previous Comments:
------------------------------------------------------------------------
[2003-07-30 00:07:41] vma1 at abv dot bg
I found the cause of the bug and posted a patch here:
http://marc.theaimsgroup.com/?l=php-dev&m=105954149002987&w=2
------------------------------------------------------------------------
[2003-07-29 07:00:29] vma1 at abv dot bg
root@www:~# gcc --version
gcc (GCC) 3.2.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
root@www:~# ls -la /lib/libc*
-rwxr-xr-x 1 root root 1435624 Mar 5 05:57
/lib/libc-2.3.1.so*
lrwxrwxrwx 1 root root 13 Jun 3 21:23 /lib/libc.so.6
-> libc-2.3.1.so*
root@www:~# ldd /usr/src/php5-200307280930/sapi/cli/php
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001d000)
libresolv.so.2 => /lib/libresolv.so.2 (0x4004b000)
libm.so.6 => /lib/libm.so.6 (0x4005c000)
libdl.so.2 => /lib/libdl.so.2 (0x4007f000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40082000)
libz.so.1 => /usr/lib/libz.so.1 (0x40097000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x400a4000)
libc.so.6 => /lib/libc.so.6 (0x40190000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
As far as I can remember everything is standard from the Slackware 9.0
distribution. The machine runs stable under heavy load so I doubt it's
a hardware problem. I'll check where the problem is, anyway, cause it
is critical for me.
------------------------------------------------------------------------
[2003-07-29 06:44:41] sniper@php.net
Also tested with the CGI, can't reproduce this with it either. And
neither could anybody else reproduce this (whom I asked). So are you
sure there is a bug? And not just something wrong with your system?
Which GCC are you using?
What glibc do you have?
------------------------------------------------------------------------
[2003-07-29 06:34:28] vma1 at abv dot bg
"php -n bug.php" gives the same script output, including the segfault.
The only difference are the HTTP headers in the beginning, because of
the missing -f option.
I started digging into the PHP code, so I'll post a patch when/if I
correct the bug.
------------------------------------------------------------------------
[2003-07-29 06:06:36] sniper@php.net
I'm still unable to reproduce this, can you try running
the script with this command:
# sapi/cli/php -n test.php
(to make it ignore any php.ini you have..)
------------------------------------------------------------------------
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/24842
--
Edit this bug report at http://bugs.php.net/?id=24842&edit=1
Thread (9 messages)