Skip to content

Instantly share code, notes, and snippets.

@brother
Last active January 4, 2019 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brother/f646c9f38816ca4c60980fe56ed2d249 to your computer and use it in GitHub Desktop.
Save brother/f646c9f38816ca4c60980fe56ed2d249 to your computer and use it in GitHub Desktop.
brother ~/Desktop/test$ gdb ./7.3.1rc1/bin/php
GNU gdb (Debian 8.2-1) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./7.3.1rc1/bin/php...done.
(gdb) run ./reprod.php
Starting program: /home/brother/Desktop/test/7.3.1rc1/bin/php ./reprod.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00005555559b54a9 in to_xml_object (type=0x7ffff5263d20, data=0x7ffff5273640, style=2, parent=0x5555565f5db0)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:1859
1859 if (prop) {GC_PROTECT_RECURSION(prop);}
(gdb) bt
#0 0x00005555559b54a9 in to_xml_object (type=0x7ffff5263d20, data=0x7ffff5273640, style=2, parent=0x5555565f5db0)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:1859
#1 0x00005555559ba4c2 in sdl_guess_convert_xml (enc=0x7ffff5263d20, data=0x7ffff5273640, style=2,
parent=0x5555565f5db0) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:3285
#2 0x00005555559afb3e in master_to_xml_int (encode=0x7ffff5263d20, data=0x7ffff5273640, style=2,
parent=0x5555565f5db0, check_class_map=1) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:502
#3 0x00005555559afb9b in master_to_xml (encode=0x7ffff5263d20, data=0x7ffff5273640, style=2, parent=0x5555565f5db0)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:513
#4 0x00005555559b49bc in model_to_xml_object (node=0x5555565f5db0, model=0x7ffff52811c0, object=0x7ffff5282480,
style=2, strict=1) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:1668
#5 0x00005555559b4ec1 in model_to_xml_object (node=0x5555565f5db0, model=0x7ffff5281188, object=0x7ffff5282480,
style=2, strict=1) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:1740
#6 0x00005555559b5830 in to_xml_object (type=0x7ffff5263c00, data=0x7ffff5282480, style=2, parent=0x5555565f5c80)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:1912
#7 0x00005555559ba4c2 in sdl_guess_convert_xml (enc=0x7ffff5263c00, data=0x7ffff5282480, style=2,
parent=0x5555565f5c80) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:3285
#8 0x00005555559afb3e in master_to_xml_int (encode=0x7ffff5263c00, data=0x7ffff5282480, style=2,
parent=0x5555565f5c80, check_class_map=1) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:502
#9 0x00005555559afb9b in master_to_xml (encode=0x7ffff5263c00, data=0x7ffff5282480, style=2, parent=0x5555565f5c80)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/php_encoding.c:513
#10 0x00005555559ac329 in serialize_zval (val=0x7ffff5282480, param=0x7ffff5201a40,
paramName=0x7ffff52823f0 "parameters", style=2, parent=0x5555565f5c80)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/soap.c:4418
#11 0x00005555559ac1b8 in serialize_parameter (param=0x7ffff5201a40, param_val=0x7ffff5282480, index=0, name=0x0,
style=2, parent=0x5555565f5c80) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/soap.c:4389
#12 0x00005555559ab9d1 in serialize_function_call (this_ptr=0x7ffff521f100, function=0x7ffff5263ae0,
function_name=0x0, uri=0x0, arguments=0x7ffff5282480, arg_count=1, version=1, soap_headers=0x0)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/soap.c:4251
#13 0x00005555559a588b in do_soap_call (execute_data=0x7ffff521f0e0, this_ptr=0x7ffff521f100,
function=0x7ffff527e6f8 "MyMethod", function_len=8, arg_count=1, real_args=0x7ffff5282480,
return_value=0x7fffffffa450, location=0x7ffff527ea00 "http://localhost:8080/test-service", soap_action=0x0,
call_uri=0x0, soap_headers=0x0, output_headers=0x0) at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/soap.c:2678
#14 0x00005555559a6986 in zim_SoapClient___call (execute_data=0x7ffff521f0e0, return_value=0x7fffffffa450)
at /home/brother/Desktop/test/php-7.3.1RC1/ext/soap/soap.c:2899
#15 0x0000555555c114ae in ZEND_CALL_TRAMPOLINE_SPEC_HANDLER ()
at /home/brother/Desktop/test/php-7.3.1RC1/Zend/zend_vm_execute.h:1996
#16 0x0000555555c75a3c in execute_ex (ex=0x7ffff521f030)
at /home/brother/Desktop/test/php-7.3.1RC1/Zend/zend_vm_execute.h:55530
#17 0x0000555555c7aefd in zend_execute (op_array=0x7ffff5280300, return_value=0x0)
at /home/brother/Desktop/test/php-7.3.1RC1/Zend/zend_vm_execute.h:60834
#18 0x0000555555baa22e in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/brother/Desktop/test/php-7.3.1RC1/Zend/zend.c:1568
#19 0x0000555555b19be3 in php_execute_script (primary_file=0x7fffffffdcd0)
at /home/brother/Desktop/test/php-7.3.1RC1/main/main.c:2630
#20 0x0000555555c7d985 in do_cli (argc=2, argv=0x5555564ce0e0)
at /home/brother/Desktop/test/php-7.3.1RC1/sapi/cli/php_cli.c:997
#21 0x0000555555c7e905 in main (argc=2, argv=0x5555564ce0e0)
at /home/brother/Desktop/test/php-7.3.1RC1/sapi/cli/php_cli.c:1389
<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="urn:test"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:test="urn:test"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<portType name="TestPortType">
<operation name="MyMethod">
<input message="test:MyMethodRequestMessage" />
<output message="test:MyMethodResponseMessage" />
</operation>
</portType>
<binding name="TestBinding" type="test:TestPortType">
<operation name="MyMethod">
<input><soap:body use="literal" /></input>
<output><soap:body use="literal" /></output>
</operation>
</binding>
<message name="MyMethodRequestMessage">
<part name="parameters" element="test:MyMethodRequest" />
</message>
<message name="MyMethodResponseMessage">
<part name="parameters" element="test:MyMethodResponse" />
</message>
<types>
<schema targetNamespace="urn:test" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="MyMethodRequest">
<complexType>
<sequence>
<element name="parameter" type="test:MyMethodRequestObject" />
</sequence>
</complexType>
</element>
<element name="MyMethodResponse" />
<complexType name="MyMethodRequestObject">
<complexContent>
<extension base="test:DynamicData" />
</complexContent>
</complexType>
<complexType name="DynamicData" />
</schema>
</types>
<service name="TestService">
<port binding="test:TestBinding" name="TestPort">
<soap:address location="http://localhost:8080/test-service" />
</port>
</service>
</definitions>
<?php
$client = new SoapClient(realpath(__DIR__ . '/schema.wsdl'), [
'cache_wsdl' => WSDL_CACHE_NONE,
]);
$client->MyMethod([
'parameter' => [],
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment