From:             judas dot iscariote at gmail dot com
Operating system: Linux 64 bit
PHP version:      5CVS-2006-07-05 (CVS)
PHP Bug Type:     Reproducible crash
Bug description:  segfault extending mysqli class.

Description:
------------
the following code segfaults in current PHP 5_2 and PHP 6 CVS in **debug**
mode.(just checked from the CVS, no need to try snapshots)

./configure --enable-debug --with-libdir=lib64
--with-mysqli=/usr/bin/mysql_config --with-zlib=/usr --disable-cgi

not sure if this is related with bug #38003..

        

Reproduce code:
---------------
<?php

class DB extends mysqli {

     private function __construct() {

         echo "bug";

     }

}

$DB = new DB();
?>



Expected result:
----------------
Fatal error: Call to private DB::__construct() from invalid context in
/srv/www/htdocs/singleton.php

Actual result:
--------------
Fatal error: Call to private DB::__construct() from invalid context in
/srv/www/htdocs/singleton.php on line 13

Program received signal SIGSEGV, Segmentation fault.
0x00000000005dd76a in instanceof_function_ex (instance_ce=0xa289b0,
ce=0x9ed4f0, interfaces_only=0 '\0')
    at /local/local/bodegon/php-debug/Zend/zend_operators.c:1600
1600                    if
(instanceof_function(instance_ce->interfaces[i], ce TSRMLS_CC)) {
(gdb) bt
#0  0x00000000005dd76a in instanceof_function_ex (instance_ce=0xa289b0,
ce=0x9ed4f0, interfaces_only=0 '\0')
    at /local/local/bodegon/php-debug/Zend/zend_operators.c:1600
#1  0x00000000005dd7ab in instanceof_function (instance_ce=<value
optimized out>, ce=<value optimized out>)
    at /local/local/bodegon/php-debug/Zend/zend_operators.c:1618
#2  0x000000000049e5d9 in mysqli_objects_free_storage (object=<value
optimized out>)
    at /local/local/bodegon/php-debug/ext/mysqli/mysqli.c:143
#3  0x000000000060329e in zend_objects_store_free_object_storage
(objects=0x8be600)
    at /local/local/bodegon/php-debug/Zend/zend_objects_API.c:86
#4  0x00000000005d8e8c in shutdown_executor () at
/local/local/bodegon/php-debug/Zend/zend_execute_API.c:281
#5  0x00000000005e5ab3 in zend_deactivate () at
/local/local/bodegon/php-debug/Zend/zend.c:854
#6  0x00000000005a417b in php_request_shutdown (dummy=<value optimized
out>)
    at /local/local/bodegon/php-debug/main/main.c:1300
#7  0x00000000006821ea in main (argc=2, argv=0x7fffffd96a48) at
/local/local/bodegon/php-debug/sapi/cli/php_cli.c:1250




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

Reply via email to