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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 10 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC