Bug #54911 [NEW]: Access to a undefined member in inherit SoapClient may cause Segmentation Fault

From: Date: Mon, 23 May 2011 17:33:22 +0000
Subject: Bug #54911 [NEW]: Access to a undefined member in inherit SoapClient may cause Segmentation Fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160917@lists.php.net to get a copy of this message
From:             
Operating system: Linux
PHP version:      5.3.6
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Access to a undefined member in inherit SoapClient may cause Segmentation Fault

Description:
------------
If you try to access an undefined variable or constant in an extended
SoapClient, it will cause PHP crash due to a Segmentation Fault.

Test script:
---------------
<?php
    class XSoapClient extends SoapClient {
        function __doRequest($request, $location, $action, $version) {
            echo self::$crash;
//          echo parent::$crash;
//          echo self::crash;
//          echo parent::crash;
        }   
    }   
    $client = new XSoapClient(null, array('uri'=>'',
'location'=>''));
    $client->__soapCall('', array());
?>

Expected result:
----------------
An error like, Fatal error: Access to undeclared static property:
XSoapClient::$crash...

Actual result:
--------------
$ sapi/cli/php ../crash.php 
Segmentation fault

# gdb backtrace...
Starting program: /home/erik/php-5.3.6/sapi/cli/php ../crash.php
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x0843c238 in zval_delref_p (zval_ptr=0xbfffcf68, __zend_filename=0x87cc4e8
"/home/erik/php-5.3.6/Zend/zend_vm_execute.h", 
    __zend_lineno=609) at /home/erik/php-5.3.6/Zend/zend.h:385
385		return --pz->refcount__gc;
(gdb) bt
#0  0x0843c238 in zval_delref_p (zval_ptr=0xbfffcf68,
__zend_filename=0x87cc4e8 "/home/erik/php-5.3.6/Zend/zend_vm_execute.h", 
    __zend_lineno=609) at /home/erik/php-5.3.6/Zend/zend.h:385
#1  _zval_ptr_dtor (zval_ptr=0xbfffcf68, __zend_filename=0x87cc4e8
"/home/erik/php-5.3.6/Zend/zend_vm_execute.h", __zend_lineno=609)
    at /home/erik/php-5.3.6/Zend/zend_execute_API.c:437
#2  0x08479ff8 in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER
(execute_data=0x8920a60) at
/home/erik/php-5.3.6/Zend/zend_vm_execute.h:609
#3  0x08478793 in execute (op_array=0x88f2be0) at
/home/erik/php-5.3.6/Zend/zend_vm_execute.h:107
#4  0x0844bae6 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/erik/php-5.3.6/Zend/zend.c:1194
#5  0x083e102e in php_execute_script (primary_file=0xbffff324) at
/home/erik/php-5.3.6/main/main.c:2268
#6  0x08509d35 in main (argc=2, argv=0xbffff4b4) at
/home/erik/php-5.3.6/sapi/cli/php_cli.c:1193


-- 
Edit bug report at http://bugs.php.net/bug.php?id=54911&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=54911&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=54911&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=54911&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=54911&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54911&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=54911&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=54911&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=54911&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=54911&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=54911&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=54911&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=54911&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=54911&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=54911&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54911&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54911&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=54911&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=54911&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=54911&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=54911&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=54911&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#160917) next »