php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66076 Segfault on SimpleXML toString
Submitted: 2013-11-11 01:25 UTC Modified: 2017-11-05 04:22 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: mengpg2 at engene dot se Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.4.21 OS: Linux and MacOS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-11-11 01:25 UTC] mengpg2 at engene dot se
Description:
------------
Hi,

I use far too old PHP libs for AWS and when upgrading from 5.3 to 5.4.21 I noticed that the string typecast made the entire PHP process segfault

    $DDB = new AmazonDynamoDB();
    $DDB->use_ssl = false;
    $Key = array('HashKeyElement' => array(AmazonDynamoDB::TYPE_NUMBER => (string)$itemid));
    $Res = $DDB->get_item(array('TableName' => 'pond_item_meta', 'Key' => $Key));
    $tt = (string)$Res->body->Item->exif_json->S;

[Mon Nov 11 02:02:07 2013] [notice] child pid 27086 exit signal Segmentation fault (11)

However, if I undo the patch between 5.4.6 and 5.4.7 in Zend/zend.c it works.





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-11 02:04 UTC] mengpg2 at engene dot se
This seems related to bug 62328. I undoed that patch which fixed my problem but gave me a...

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #62328 (implementing __toString and a cast to string fails) [ext/xml/tests/bug62328.phpt]
=====================================================================
 [2013-11-11 03:50 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2013-11-11 03:50 UTC] laruence@php.net
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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.


 [2013-11-11 09:13 UTC] mengpg2 at engene dot se
(gdb) bt
#0  0x0000000109989f30 in zend_call_method (object_pp=0x7fff68219100, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff682190e8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:35
#1  0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff682191b8, type=6) at zend_object_handlers.c:1534
#2  0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff682191b8, use_copy=0x7fff682191b4) at zend.c:261
#3  0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb67778) at zend_vm_execute.h:27329
#4  0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#5  0x000000010994c1a1 in zend_call_function (fci=0x7fff68219508, fci_cache=0x7fff68219490) at zend_execute_API.c:956
#6  0x000000010998a342 in zend_call_method (object_pp=0x7fff68219660, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff68219648, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#7  0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff68219718, type=6) at zend_object_handlers.c:1534
#8  0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff68219718, use_copy=0x7fff68219714) at zend.c:261
#9  0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb67508) at zend_vm_execute.h:27329
#10 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#11 0x000000010994c1a1 in zend_call_function (fci=0x7fff68219a68, fci_cache=0x7fff682199f0) at zend_execute_API.c:956
#12 0x000000010998a342 in zend_call_method (object_pp=0x7fff68219bc0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff68219ba8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#13 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff68219c78, type=6) at zend_object_handlers.c:1534
#14 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff68219c78, use_copy=0x7fff68219c74) at zend.c:261
#15 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb67298) at zend_vm_execute.h:27329
#16 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#17 0x000000010994c1a1 in zend_call_function (fci=0x7fff68219fc8, fci_cache=0x7fff68219f50) at zend_execute_API.c:956
#18 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821a120, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821a108, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#19 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821a1d8, type=6) at zend_object_handlers.c:1534
#20 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821a1d8, use_copy=0x7fff6821a1d4) at zend.c:261
#21 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb67028) at zend_vm_execute.h:27329
#22 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#23 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821a528, fci_cache=0x7fff6821a4b0) at zend_execute_API.c:956
#24 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821a680, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821a668, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#25 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821a738, type=6) at zend_object_handlers.c:1534
---Type <return> to continue, or q <return> to quit--- 
#26 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821a738, use_copy=0x7fff6821a734) at zend.c:261
#27 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb66db8) at zend_vm_execute.h:27329
#28 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#29 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821aa88, fci_cache=0x7fff6821aa10) at zend_execute_API.c:956
#30 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821abe0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821abc8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#31 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821ac98, type=6) at zend_object_handlers.c:1534
#32 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821ac98, use_copy=0x7fff6821ac94) at zend.c:261
#33 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb66b48) at zend_vm_execute.h:27329
#34 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#35 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821afe8, fci_cache=0x7fff6821af70) at zend_execute_API.c:956
#36 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821b140, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821b128, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#37 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821b1f8, type=6) at zend_object_handlers.c:1534
#38 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821b1f8, use_copy=0x7fff6821b1f4) at zend.c:261
#39 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb668d8) at zend_vm_execute.h:27329
#40 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#41 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821b548, fci_cache=0x7fff6821b4d0) at zend_execute_API.c:956
#42 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821b6a0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821b688, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#43 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821b758, type=6) at zend_object_handlers.c:1534
#44 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821b758, use_copy=0x7fff6821b754) at zend.c:261
#45 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb66668) at zend_vm_execute.h:27329
#46 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#47 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821baa8, fci_cache=0x7fff6821ba30) at zend_execute_API.c:956
#48 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821bc00, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821bbe8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#49 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821bcb8, type=6) at zend_object_handlers.c:1534
#50 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821bcb8, use_copy=0x7fff6821bcb4) at zend.c:261
#51 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb663f8) at zend_vm_execute.h:27329
#52 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#53 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821c008, fci_cache=0x7fff6821bf90) at zend_execute_API.c:956
---Type <return> to continue, or q <return> to quit---
#54 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821c160, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821c148, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#55 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821c218, type=6) at zend_object_handlers.c:1534
#56 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821c218, use_copy=0x7fff6821c214) at zend.c:261
#57 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb66188) at zend_vm_execute.h:27329
#58 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#59 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821c568, fci_cache=0x7fff6821c4f0) at zend_execute_API.c:956
#60 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821c6c0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821c6a8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#61 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821c778, type=6) at zend_object_handlers.c:1534
#62 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821c778, use_copy=0x7fff6821c774) at zend.c:261
#63 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb65f18) at zend_vm_execute.h:27329
#64 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#65 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821cac8, fci_cache=0x7fff6821ca50) at zend_execute_API.c:956
#66 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821cc20, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821cc08, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#67 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821ccd8, type=6) at zend_object_handlers.c:1534
#68 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821ccd8, use_copy=0x7fff6821ccd4) at zend.c:261
#69 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb65ca8) at zend_vm_execute.h:27329
#70 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#71 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821d028, fci_cache=0x7fff6821cfb0) at zend_execute_API.c:956
#72 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821d180, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821d168, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#73 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821d238, type=6) at zend_object_handlers.c:1534
#74 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821d238, use_copy=0x7fff6821d234) at zend.c:261
#75 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb65a38) at zend_vm_execute.h:27329
#76 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#77 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821d588, fci_cache=0x7fff6821d510) at zend_execute_API.c:956
#78 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821d6e0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821d6c8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#79 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821d798, type=6) at zend_object_handlers.c:1534
---Type <return> to continue, or q <return> to quit---
#80 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821d798, use_copy=0x7fff6821d794) at zend.c:261
#81 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb657c8) at zend_vm_execute.h:27329
#82 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#83 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821dae8, fci_cache=0x7fff6821da70) at zend_execute_API.c:956
#84 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821dc40, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821dc28, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#85 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821dcf8, type=6) at zend_object_handlers.c:1534
#86 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821dcf8, use_copy=0x7fff6821dcf4) at zend.c:261
#87 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb65558) at zend_vm_execute.h:27329
#88 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#89 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821e048, fci_cache=0x7fff6821dfd0) at zend_execute_API.c:956
#90 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821e1a0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821e188, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#91 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821e258, type=6) at zend_object_handlers.c:1534
#92 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821e258, use_copy=0x7fff6821e254) at zend.c:261
#93 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb652e8) at zend_vm_execute.h:27329
#94 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#95 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821e5a8, fci_cache=0x7fff6821e530) at zend_execute_API.c:956
#96 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821e700, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821e6e8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#97 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821e7b8, type=6) at zend_object_handlers.c:1534
#98 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821e7b8, use_copy=0x7fff6821e7b4) at zend.c:261
#99 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb65078) at zend_vm_execute.h:27329
#100 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#101 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821eb08, fci_cache=0x7fff6821ea90) at zend_execute_API.c:956
#102 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821ec60, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821ec48, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#103 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821ed18, type=6) at zend_object_handlers.c:1534
#104 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821ed18, use_copy=0x7fff6821ed14) at zend.c:261
#105 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb44c50) at zend_vm_execute.h:27329
#106 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#107 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821f068, fci_cache=0x7fff6821eff0) at zend_execute_API.c:956
---Type <return> to continue, or q <return> to quit---
#108 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821f1c0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821f1a8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#109 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821f278, type=6) at zend_object_handlers.c:1534
#110 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821f278, use_copy=0x7fff6821f274) at zend.c:261
#111 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb449e0) at zend_vm_execute.h:27329
#112 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#113 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821f5c8, fci_cache=0x7fff6821f550) at zend_execute_API.c:956
#114 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821f720, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821f708, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#115 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821f7d8, type=6) at zend_object_handlers.c:1534
#116 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821f7d8, use_copy=0x7fff6821f7d4) at zend.c:261
#117 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb44770) at zend_vm_execute.h:27329
#118 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#119 0x000000010994c1a1 in zend_call_function (fci=0x7fff6821fb28, fci_cache=0x7fff6821fab0) at zend_execute_API.c:956
#120 0x000000010998a342 in zend_call_method (object_pp=0x7fff6821fc80, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff6821fc68, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97
#121 0x00000001099a049a in zend_std_cast_object_tostring (readobj=0x10b1f3d70, writeobj=0x7fff6821fd38, type=6) at zend_object_handlers.c:1534
#122 0x000000010995f88a in zend_make_printable_zval (expr=0x10b1f3d70, expr_copy=0x7fff6821fd38, use_copy=0x7fff6821fd34) at zend.c:261
#123 0x00000001099b22b6 in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x10bb44500) at zend_vm_execute.h:27329
#124 0x00000001099a48b7 in execute (op_array=0x10b47bb98) at zend_vm_execute.h:410
#125 0x000000010994c1a1 in zend_call_function (fci=0x7fff68220088, fci_cache=0x7fff68220010) at zend_execute_API.c:956
#126 0x000000010998a342 in zend_call_method (object_pp=0x7fff682201e0, obj_ce=0x10b477df8, fn_proxy=0x10b477f60, 
    function_name=0x109e41850 "__tostring", function_name_len=10, retval_ptr_ptr=0x7fff682201c8, param_count=0, arg1=0x0, arg2=0x0)
    at zend_interfaces.c:97

.....thousands of rows
 [2013-11-11 09:33 UTC] laruence@php.net
seems it's a recursively call to __toString..

like:

<?php

class A {
    public function __toString() {
        return (string)$this;
    }
}


so I think this should not considered as a bug... but a wrong usage
 [2013-11-11 09:45 UTC] mengpg2 at engene dot se
$DDB = new AmazonDynamoDB();
    $DDB->use_ssl = false;
    $Key = array('HashKeyElement' => array(AmazonDynamoDB::TYPE_NUMBER => (string)$itemid));
    $Res = $DDB->get_item(array('TableName' => 'pond_item_meta', 'Key' => $Key));
    $tt = (string)$Res->body->Item->exif_json->S;

But this is the offending code. Casting on a CFSimpleXML object. Worked flawlessly to 5.4.7. Is it a CFSimpleXML bug?
 [2013-11-11 10:13 UTC] mengpg2 at engene dot se
this is part of the object that crashes in the example.


  ["body"]=>
  object(CFSimpleXML)#12 (2) {
    ["ConsumedCapacityUnits"]=>
    string(3) "0.5"
    ["Item"]=>
    object(CFSimpleXML)#10 (2) {
      ["exif_json"]=>
      object(CFSimpleXML)#15 (1) {
        ["S"]=>
        string(1923) "{"major brand": "Apple QuickTime (.MOV/QT)", "source image height": "480", "selection time": "0 s", "gen flags": "0 0 0", "file size": "46 MB", "track header version": "0", "movie header version": "0", "compatible brands": "qt", "file permissions": "rw-r--r--", "duration": "13.35 s", "handler description": "Apple Alias Data Handler", "source image width": "720", "selection duration": "0 s", "modify date": "2005:07:25 17:57:00", "minor version": "2005.3.0", "image height": "480", "current time": "0 s", "track modify date": "2005:07:25 17:57:00", "track volume": "0.00%", "compressor id": "dvc", "movie data size": "4", "y resolution": "72", "image width": "720", "create date": "2005:07:25 17:56:52", "video frame rate": "29.97", "track layer": "0", "poster time": "0 s", "vendor id": "Apple", "graphics mode": "ditherCopy", "preview time": "0 s", "media modify date": "2005:07:25 17:57:00", "matrix structure": "1 0 0 0 1 0 0 0 1", "op color": "32768 32768 32768", "time scale": "2997", "track duration": "13.35 s", "avg bitrate": "2 bps", "handler class": "Data Handler", "gen graphics mode": "ditherCopy", "gen op color": "32768 32768 32768", "file type": "MOV", "exiftool version number": "8.76", "directory": "/tmp", "media duration": "13.35 s", "preferred volume": "100.00%", "handler vendor id": "Apple", "image size": "720x480", "track id": "1", "rotation": "0", "bit depth": "24", "media create date": "2005:07:25 17:57:00", "gen media version": "0", "mime type": "video/quicktime", "x resolution": "72", "compressor name": "DV/DVCPRO - NTSC", "file name": "672ea710dc1d43a8e951dd6509e42e88_probe.mov", "other format": "tmcd", "gen balance": "0", "media time scale": "2997", "track create date": "2005:07:25 17:56:52", "file modification date/time": "2010:01:29 21:46:02+00:00", "media header version": "0", "next track id": "3", "handler type": "Alias Data", "preferred rate": "1", "preview duration": "0 s"}"
      }
      ["pond_item_common"]=>
      object(CFSimpleXML)#14 (1) {
        ["N"]=>
        string(2) "13"
      }
    }
  }
  ["status"]=>
  int(200)
}
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2014-12-30 11:15 UTC] mengpg2 at engene dot se
I am hand patching zend.c for each version I upgrade or else I experience php code crashing the Apache instance. I did add feedback, but it was ignored.
 [2014-12-30 18:53 UTC] requinix@php.net
-Status: No Feedback +Status: Open
 [2017-10-24 14:12 UTC] yunosh@php.net
-Status: Open +Status: Feedback
 [2017-10-24 14:12 UTC] yunosh@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2017-11-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC