From:             delphi32 at gmx dot de
Operating system: Gentoo Linux 2.6.10-rc1
PHP version:      5.0.2
PHP Bug Type:     Class/Object related
Bug description:  Possible segfault in __destruct when using parent <--> child 
relations.

Description:
------------
I got a segmentation fault by executing the postet code. If you execute it
in CLI mode, you will see the segfault. If it is executed by mod_php
Firefox does nothing.

I have no idea why PHP segfaults. I was able to reduce the problem to 1
line. I have written comments into the code which show the problem.

Of course, the code is trash but PHP should not segfault in such a
situation.

My config line follows:

./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --with-apxs2=/usr/sbin/apxs2
--with-config-file-path=/etc/php/apache2-php5 --without-pear
--disable-bcmath --with-bz2=shared --disable-calendar
--with-cpdflib=shared --disable-ctype --without-curl
--without-curlwrappers --disable-dbase --disable-dio --disable-exif
--without-fam --without-fbsql --without-fdftk --disable-filepro
--enable-ftp=shared --with-gettext=shared --without-gmp --without-hwapi
--with-iconv=shared --without-informix --without-ingres
--without-interbase --enable-mbstring=shared --with-mcrypt=shared
--without-mcve --disable-memory-limit --without-mhash
--with-mime-magic=/usr/share/misc/file/magic.mime --without-ming
--without-mnogosearch --without-msql --without-mssql --with-ncurses=shared
--without-oci8 --without-oracle --with-openssl=shared
--with-openssl-dir=/usr --without-ovrimos --disable-pcntl
--without-pcre-regx --without-pfpro --without-pgsql --with-pspell=shared
--without-recode --disable-simplexml --enable-shmop --without-snmp
--disable-soap --enable-sockets=shared --without-sybase
--without-sybase-ct --disable-sysvmsg --disable-sysvsem --disable-sysvshm
--without-tidy --disable-tokenizer --disable-wddx --without-xsl
--without-xmlrpc --disable-yp --with-zlib=shared --disable-debug
--without-cdb --with-db4=shared --without-dbm --without-flatfile
--with-gdbm=shared --without-inifile --without-qdbm --with-jpeg-dir=/usr
--with-gd=shared,/usr --enable-gd-jis-conf --enable-gd-native-ttf
--with-imap=shared --with-imap-ssl --with-mysql=shared
--with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mm --without-msession
--without-sqlite --enable-dba=shared --with-readline --without-libedit


Enrico Neidt

Reproduce code:
---------------
http://www2.schlampenschlacht.de/segfault.txt

I don't know how long I can host the file there. If it's not there just
mail me, I'll send you a copy. Sorry for that.

Expected result:
----------------
This would be correct:

PARENT DESTRUCT
Before segfault (0)
After segfault (0)
Before segfault (1)
After segfault (1)
Before segfault (2)
After segfault (2)
Before segfault (3)
After segfault (3)
Before segfault (4)
After segfault (4)

Actual result:
--------------
Because I am not able (allowed) to debug php (has no debugging symbols) I
only can give you the output generated by the php script:

PARENT DESTRUCT
Before segfault (0)
Before segfault (1)
After segfault (1)
Before segfault (2)
After segfault (2)
Before segfault (3)
After segfault (3)
Before segfault (4)
After segfault (4)
After segfault (0)
Segmentation fault


-- 
Edit bug report at http://bugs.php.net/?id=30877&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30877&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30877&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30877&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30877&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30877&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30877&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30877&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30877&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30877&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30877&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30877&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30877&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30877&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30877&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30877&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30877&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30877&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30877&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30877&r=mysqlcfg

Reply via email to