|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-02-15 12:44 UTC] cf0hay at gmail dot com
Description:
------------
PHP 7.0.3 crashes when making a soap request with a union simpleType. PHP 5.6 doesn't have this problem.
Test script:
---------------
#!/usr/bin/php
<?php
$soap = new SoapClient("test.wsdl", ['trace' => true]);
try{
$resp = $soap->notify([
'resourceId' => '',
]);
}catch(SoapFault $e){
echo $e->getMessage()."\n";
}
Expected result:
----------------
Could not connect to host
Actual result:
--------------
Segmentation Fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 14:00:01 2025 UTC |
The previous one was stripped from debug information, but was compiled with -O0 (without compiler optimization) This one was with -O2, but with debug information: (gdb) run wstest_segfault.php Starting program: /usr/lib64/php7.0/bin/php wstest_segfault.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000000000642d00 in _zval_dtor (zvalue=<optimized out>, zvalue=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_variables.h:44 44 /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_variables.h: Nincs ilyen fájl vagy könyvtár. (gdb) bt #0 0x0000000000642d00 in _zval_dtor (zvalue=<optimized out>, zvalue=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_variables.h:44 #1 to_xml_list (data=<optimized out>, style=style@entry=2, parent=<optimized out>, enc=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:3060 #2 0x0000000000645f9f in to_xml_union (parent=<optimized out>, style=2, data=<optimized out>, enc=0x7fffefc55658) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:3077 #3 sdl_guess_convert_xml (enc=0x7fffefc55658, data=<optimized out>, style=2, parent=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:3264 #4 0x0000000000642003 in master_to_xml_int (encode=encode@entry=0x7fffefc55658, data=0x7fffefc5ca20, style=style@entry=2, parent=parent@entry=0x1284120, check_class_map=check_class_map@entry=1) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:501 #5 0x00000000006426bb in master_to_xml (encode=encode@entry=0x7fffefc55658, data=<optimized out>, style=style@entry=2, parent=parent@entry=0x1284120) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:512 #6 0x00000000006451c9 in model_to_xml_object (node=node@entry=0x1284120, model=model@entry=0x7fffefc01180, object=object@entry=0x7fffefc620d0, style=style@entry=2, strict=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:1670 #7 0x000000000064538e in model_to_xml_object (node=node@entry=0x1284120, model=<optimized out>, object=object@entry=0x7fffefc620d0, style=style@entry=2, strict=<optimized out>, strict@entry=1) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:1742 #8 0x000000000064591d in to_xml_object (type=0x7fffefc555b0, data=0x7fffefc620d0, style=2, parent=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:1913 #9 0x0000000000642003 in master_to_xml_int (encode=encode@entry=0x7fffefc555b0, data=0x7fffefc620d0, style=style@entry=2, parent=0x12808d0, check_class_map=check_class_map@entry=1) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:501 #10 0x00000000006426bb in master_to_xml (encode=encode@entry=0x7fffefc555b0, data=<optimized out>, style=style@entry=2, parent=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/php_encoding.c:512 #11 0x00000000006304b0 in serialize_zval (val=<optimized out>, val@entry=0x7fffefc620d0, param=param@entry=0x7fffefc61980, paramName=0x7fffefc80060 "body", style=style@entry=2, parent=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/soap.c:4465 #12 0x0000000000630672 in serialize_parameter (param=param@entry=0x7fffefc61980, param_val=param_val@entry=0x7fffefc620d0, index=index@entry=0, name=<optimized out>, name@entry=0x0, style=style@entry=2, parent=parent@entry=0x12808d0) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/soap.c:4437 #13 0x00000000006347f9 in serialize_function_call (this_ptr=this_ptr@entry=0x7fffefc13150, function=function@entry=0x7fffefc63140, function_name=function_name@entry=0x0, uri=<optimized out>, arguments=arguments@entry=0x7fffefc620d0, arg_count=arg_count@entry=1, version=1, soap_headers=0x0) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/soap.c:4300 #14 0x000000000063d1d1 in do_soap_call (this_ptr=this_ptr@entry=0x7fffefc13150, function=0x11d4708 "notify", arg_count=1, real_args=0x7fffefc620d0, return_value=0x7fffefc130f0, location=0x7fffefc01210 "http://localhost/", soap_action=0x0, call_uri=0x0, soap_headers=0x0, output_headers=0x0, function_len=6, execute_data=0x7fffefc13130) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/soap.c:2732 #15 0x000000000063da3c in zim_SoapClient___call (execute_data=0x7fffefc13130, return_value=0x7fffefc130f0) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/ext/soap/soap.c:2952 #16 0x00000000008317a4 in ZEND_CALL_TRAMPOLINE_SPEC_HANDLER () at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_vm_execute.h:1809 #17 0x00000000007e49ab in execute_ex (ex=<optimized out>) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_vm_execute.h:414 #18 0x0000000000838727 in zend_execute (op_array=0x7fffefc8a000, op_array@entry=0x10c0908 <executor_globals+1480>, return_value=return_value@entry=0x7fffefc13030) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend_vm_execute.h:458 #19 0x00000000007a5c33 in zend_execute_scripts (type=type@entry=8, retval=0x7fffefc13030, retval@entry=0x0, file_count=file_count@entry=3) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/Zend/zend.c:1427 #20 0x00000000007474d0 in php_execute_script (primary_file=primary_file@entry=0x7fffffffc620) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/main/main.c:2484 #21 0x000000000083a3f9 in do_cli (argc=2, argv=0x10c5fa0) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/sapi/cli/php_cli.c:974 #22 0x00000000004858dd in main (argc=2, argv=0x10c5fa0) at /var/tmp/portage/dev-lang/php-7.0.3/work/sapis-build/cli/sapi/cli/php_cli.c:1345