#32852 [Opn->Fbk]: Crash with singleton and __destruct

2005-04-28 Thread sniper
 ID:   32852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cox at idecnet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

I still can't reproduce this. I get same result with both HEAD and
PHP_5_0 branches and also with the snapshot.

Does it give same result if you make sure you don't load any php.ini:
sapi/cli/php -n file.php
What bison version do you have installed?
What compiler (and version) ?



Previous Comments:


[2005-04-28 10:53:13] cox at idecnet dot com

With today's CVS (5.1), it does not crash. But the output is:

Output:
i'm called
i'm called
i'm called
i'm called

The __destruct() function is called 4 times.

With php5-STABLE-200504271035 (5.0.5dev):
$ make distclean
$ ./configure \
--prefix=/usr \
--with-config-file-path=/etc/php5 \
--enable-cli \
--disable-cgi \
--disable-pear \
--enable-debug

Still the same output and same crash.



[2005-04-28 00:25:57] [EMAIL PROTECTED]

If you configure with --enable-debug (rm config.cache && ./configure +
your options + --enable-debug && make clean && make) does it still
crash? Are you sure you ARE using the latest CVS? (the snapshots might
not be updated again..)




[2005-04-27 23:25:44] [EMAIL PROTECTED]

Still works fine here.
Both with HEAD and 5.0.x.



[2005-04-27 16:52:39] cox at idecnet dot com

Versions and compile options for the two that crashes for me. In case
it says something for you, if I remove the __destructor() function the
code works good (also you see in the output this function is being
called twice).

5.0.4
~~~

PHP 5.0.4 (cli) (built: Apr 27 2005 11:48:13)
Configure Command =>  './configure' '--prefix=/usr'
'--with-config-file-path=/etc/php5' '--with-xml' '--with-zlib'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-png-dir' '--with-jpeg-dir' '--disable-pear' '--with-mysql=/usr'
'--with-imap=/usr/include/imap' '--with-imap-ssl' '--with-kerberos'
'--with-gettext' '--enable-ftp' '--with-dom' '--with-mhash'
'--with-mcrypt' '--enable-cli' '--enable-sockets' '--enable-sigchild'
'--enable-pcntl' '--enable-shmop' '--enable-posix' '--enable-bcmath'
'--with-xmlrpc' '--with-mime-magic' '--disable-cgi'

5.0.5 Snapshot Stable
~~~

PHP 5.0.5-dev (cli) (built: Apr 27 2005 13:47:32) (DEBUG)
Configure Command =>  './configure' '--prefix=/usr'
'--with-config-file-path=/etc/php5' '--with-xml' '--with-zlib'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-png-dir' '--with-jpeg-dir' '--disable-pear' '--with-mysql=/usr'
'--with-imap=/usr/include/imap' '--with-imap-ssl' '--with-kerberos'
'--with-gettext' '--enable-ftp' '--with-dom' '--with-mhash'
'--with-mcrypt' '--enable-cli' '--enable-sockets' '--enable-sigchild'
'--enable-pcntl' '--enable-shmop' '--enable-posix' '--enable-bcmath'
'--with-xmlrpc' '--with-mime-magic' '--disable-cgi' '--enable-debug'



[2005-04-27 14:41:26] [EMAIL PROTECTED]

For some reason it doesn't crash for me..did you use --enable-debug ?




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/32852

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


#32852 [Opn->Fbk]: Crash with singleton and __destruct

2005-04-27 Thread sniper
 ID:   32852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cox at idecnet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

If you configure with --enable-debug (rm config.cache && ./configure +
your options + --enable-debug && make clean && make) does it still
crash? Are you sure you ARE using the latest CVS? (the snapshots might
not be updated again..)



Previous Comments:


[2005-04-27 23:25:44] [EMAIL PROTECTED]

Still works fine here.
Both with HEAD and 5.0.x.



[2005-04-27 16:52:39] cox at idecnet dot com

Versions and compile options for the two that crashes for me. In case
it says something for you, if I remove the __destructor() function the
code works good (also you see in the output this function is being
called twice).

5.0.4
~~~

PHP 5.0.4 (cli) (built: Apr 27 2005 11:48:13)
Configure Command =>  './configure' '--prefix=/usr'
'--with-config-file-path=/etc/php5' '--with-xml' '--with-zlib'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-png-dir' '--with-jpeg-dir' '--disable-pear' '--with-mysql=/usr'
'--with-imap=/usr/include/imap' '--with-imap-ssl' '--with-kerberos'
'--with-gettext' '--enable-ftp' '--with-dom' '--with-mhash'
'--with-mcrypt' '--enable-cli' '--enable-sockets' '--enable-sigchild'
'--enable-pcntl' '--enable-shmop' '--enable-posix' '--enable-bcmath'
'--with-xmlrpc' '--with-mime-magic' '--disable-cgi'

5.0.5 Snapshot Stable
~~~

PHP 5.0.5-dev (cli) (built: Apr 27 2005 13:47:32) (DEBUG)
Configure Command =>  './configure' '--prefix=/usr'
'--with-config-file-path=/etc/php5' '--with-xml' '--with-zlib'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-png-dir' '--with-jpeg-dir' '--disable-pear' '--with-mysql=/usr'
'--with-imap=/usr/include/imap' '--with-imap-ssl' '--with-kerberos'
'--with-gettext' '--enable-ftp' '--with-dom' '--with-mhash'
'--with-mcrypt' '--enable-cli' '--enable-sockets' '--enable-sigchild'
'--enable-pcntl' '--enable-shmop' '--enable-posix' '--enable-bcmath'
'--with-xmlrpc' '--with-mime-magic' '--disable-cgi' '--enable-debug'



[2005-04-27 14:41:26] [EMAIL PROTECTED]

For some reason it doesn't crash for me..did you use --enable-debug ?




[2005-04-27 14:10:28] cox at idecnet dot com

I'm not very expert on gdb usage. Please tell me if you need extra
info.

$ gdb /usr/bin/php5.0.5dev core.31085
GNU gdb 6.0-2mdk (Mandrake Linux)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
 
Core was generated by `/usr/bin/php5.0.5dev test.php'.
Program terminated with signal 11, Segmentation fault.
 
warning: current_sos: Can't read pathname for load map: Input/output
error
 
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libexpat.so.0...done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /usr/lib/libmysqlclient.so.12...done.
Loaded symbols for /usr/lib/libmysqlclient.so.12
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /usr/lib/libmhash.so.2...done.
Loaded symbols for /usr/lib/libmhash.so.2
Reading symbols from /usr/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libltdl.so.3...done.
Loaded symbols for /usr/lib/libltdl.so.3
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libpng.so.3...done.
Loaded symbols for /usr/lib/libpng.so.3
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded sy

#32852 [Opn->Fbk]: Crash with singleton and __destruct

2005-04-27 Thread sniper
 ID:   32852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cox at idecnet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

For some reason it doesn't crash for me..did you use --enable-debug ?



Previous Comments:


[2005-04-27 14:10:28] cox at idecnet dot com

I'm not very expert on gdb usage. Please tell me if you need extra
info.

$ gdb /usr/bin/php5.0.5dev core.31085
GNU gdb 6.0-2mdk (Mandrake Linux)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
 
Core was generated by `/usr/bin/php5.0.5dev test.php'.
Program terminated with signal 11, Segmentation fault.
 
warning: current_sos: Can't read pathname for load map: Input/output
error
 
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libexpat.so.0...done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /usr/lib/libmysqlclient.so.12...done.
Loaded symbols for /usr/lib/libmysqlclient.so.12
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /usr/lib/libmhash.so.2...done.
Loaded symbols for /usr/lib/libmhash.so.2
Reading symbols from /usr/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libltdl.so.3...done.
Loaded symbols for /usr/lib/libltdl.so.3
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libpng.so.3...done.
Loaded symbols for /usr/lib/libpng.so.3
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/lib/libssl.so.0.9.7
Reading symbols from /usr/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x08234e5a in zend_get_class_entry (zobject=0x844556c)
at /usr/src/php5-STABLE-200504271035/Zend/zend_API.c:204
204 if (Z_OBJ_HT_P(zobject)->get_class_entry) {
(gdb) bt
#0  0x08234e5a in zend_get_class_entry (zobject=0x844556c)
at /usr/src/php5-STABLE-200504271035/Zend/zend_API.c:204
#1  0x0825c021 in zend_assign_to_variable (result=0x845cefc,
op1=0x845cf10,
op2=0x845cf24, value=0x844556c, type=4, Ts=0xbfffcfb0)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:599
#2  0x0825c48f in zend_assign_handler (execute_data=0xbfffd0d0,
opline=0x845cef8, op_array=0x845b884)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:2267
#3  0x082587a6 in execute (op_array=0x845b884)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:1411
#4  0x0825d759 in zend_do_fcall_common_helper
(execute_data=0xbfffd1f0,
opline=0x8459b10, op_array=0x84557f4)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:2761
#5  0x0825dd20 in zend_do_fcall_by_name_handler
(execute_data=0xbfffd1f0,
opline=0x8459b10, op_array=0x84557f4)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:2846
#6  0x082587a6 in execute (op_array=0x84557f4)
at /usr/src/php5-STABLE-200504271035/Zend/zend_execute.c:1411
#7  0x082346fa in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/src

#32852 [Opn->Fbk]: Crash with singleton and __destruct

2005-04-27 Thread johannes
 ID:   32852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cox at idecnet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:


[2005-04-27 13:12:30] cox at idecnet dot com

With php5-STABLE-200504271035:

PHP 5.0.5-dev (cli) (built: Apr 27 2005 13:08:58)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

The bug is still there.

Tomas V.V.Cox



[2005-04-27 12:52:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2005-04-27 12:44:58] cox at idecnet dot com

Description:

Crash with singleton() and __destruct(), see below.

Tomas V.V.Cox

Reproduce code:
---


Expected result:

i'm called

Actual result:
--
i'm called
i'm called
Segmentation fault (core dumped)






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


#32852 [Opn->Fbk]: Crash with singleton and __destruct

2005-04-27 Thread tony2001
 ID:   32852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cox at idecnet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip




Previous Comments:


[2005-04-27 12:44:58] cox at idecnet dot com

Description:

Crash with singleton() and __destruct(), see below.

Tomas V.V.Cox

Reproduce code:
---


Expected result:

i'm called

Actual result:
--
i'm called
i'm called
Segmentation fault (core dumped)






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