php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67826 xhprof crashes
Submitted: 2014-08-12 10:40 UTC Modified: 2014-08-12 11:04 UTC
From: dmitry at acquia dot com Assigned:
Status: Closed Package: xhprof (PECL)
PHP Version: 5.5.15 OS: osx 10.9.3
Private report: No CVE-ID: None
 [2014-08-12 10:40 UTC] dmitry at acquia dot com
Description:
------------
Provided PHP script crashes xhprof

Test script:
---------------
<?php

$a = array(1, 2, 3);
xhprof_enable();
array_filter($a, 'is_array');


Actual result:
--------------
Bus error: 10

Some info from gdb:

* thread #1: tid = 0x88ea77, 0x02945b3e xhprof.so`hp_execute_internal(execute_data=0xbfffe3a0, fci=0xbfffe5b8, ret=1, tsrm_ls=0x01f5bd90) + 366 at xhprof.c:1708, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0xc)
    frame #0: 0x02945b3e xhprof.so`hp_execute_internal(execute_data=0xbfffe3a0, fci=0xbfffe5b8, ret=1, tsrm_ls=0x01f5bd90) + 366 at xhprof.c:1708
   1705	    /* no old override to begin with. so invoke the builtin's implementation  */
   1706	    zend_op *opline = EX(opline);
   1707	#if ZEND_EXTENSION_API_NO >= 220100525
-> 1708	    temp_variable *retvar = &EX_T(opline->result.var);
   1709	    ((zend_internal_function *) EX(function_state).function)->handler(
   1710	                       opline->extended_value,
   1711	                       retvar->var.ptr,
(lldb) p opline

(zend_op *) $0 = 0x00000000
(lldb) bt
* thread #1: tid = 0x88ea77, 0x02945b3e xhprof.so`hp_execute_internal(execute_data=0xbfffe3a0, fci=0xbfffe5b8, ret=1, tsrm_ls=0x01f5bd90) + 366 at xhprof.c:1708, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0xc)
  * frame #0: 0x02945b3e xhprof.so`hp_execute_internal(execute_data=0xbfffe3a0, fci=0xbfffe5b8, ret=1, tsrm_ls=0x01f5bd90) + 366 at xhprof.c:1708
    frame #1: 0x007b0d87 php.bin`zend_call_function + 6503
    frame #2: 0x005cfcd0 php.bin`zif_array_filter + 480
    frame #3: 0x02945bcb xhprof.so`hp_execute_internal(execute_data=0x01ebe068, fci=0x00000000, ret=0, tsrm_ls=0x01f5bd90) + 507 at xhprof.c:1709
    frame #4: 0x008f56d6 php.bin`zend_do_fcall_common_helper_SPEC + 1910
    frame #5: 0x00861e89 php.bin`ZEND_DO_FCALL_SPEC_CONST_HANDLER + 441
    frame #6: 0x00816d83 php.bin`execute_ex + 3091
    frame #7: 0x00817a4a php.bin`zend_execute + 3034
    frame #8: 0x007cab48 php.bin`zend_execute_scripts + 728
    frame #9: 0x007011d1 php.bin`php_execute_script + 1441
    frame #10: 0x00952b5a php.bin`do_cli + 4298
    frame #11: 0x009515e7 php.bin`main + 2983


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-12 10:43 UTC] dmitry at acquia dot com
P.S. I took xhprof source from here:
http://pecl.php.net/get/xhprof-0.9.4.tgz
 [2014-08-12 11:04 UTC] dmitry at acquia dot com
-Status: Open +Status: Closed
 [2014-08-12 11:04 UTC] dmitry at acquia dot com
Seems to be a duplicate of: https://bugs.php.net/bug.php?id=65345
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 12:01:26 2019 UTC