View Issue Details

IDProjectCategoryView StatusLast Update
0001893XdebugCode Coveragepublic2020-12-02 17:08
Reportertrowski Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.0RC1 
Target Version3.0devFixed in Version3.0.1 
Summary0001893: Crash with ext-fiber and xdebug.mode=coverage
DescriptionWhen running tests for Amp v3 using ext-fiber, I get a BAD ACCESS in `xdebug_create_key_for_path` when collecting code coverage.
Steps To ReproduceInstall ext-fiber, https://github.com/amphp/ext-fiber. (Like most PHP extensions, phpize, ./configure, make, make install).
Set xdebug.mode=coverage
Clone https://github.com/amphp/amp, checkout v3 branch.
composer install --ignore-platform-reqs
Run `vendor/bin/phpunit --coverage-text`
TagsNo tags attached.
Operating System
PHP Version8.0-dev

Activities

trowski

2020-11-21 18:02

reporter  

trace.txt (3,474 bytes)   
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x2eb)
  * frame #0: 0x0000000101f1e2a5 xdebug.so`xdebug_create_key_for_path(path=0x0000000101b4b480, str=0x0000000105e036d0) at branch_info.c:322:32
    frame #1: 0x0000000101f1f63a xdebug.so`xdebug_code_coverage_end_of_function(op_array=0x000000012970b238, filename=0x0000000103d1e1c0, function_name="Amp\\{closure:/Users/aaron/Developer/amp/lib/functions.php:29-33}") at code_coverage.c:655:2
    frame #2: 0x0000000101f207bf xdebug.so`xdebug_coverage_execute_ex_end(fse=0x0000000104009640, op_array=0x000000012970b238, tmp_filename=0x0000000103d1e1c0, tmp_function_name="Amp\\{closure:/Users/aaron/Developer/amp/lib/functions.php:29-33}") at code_coverage.c:990:3
    frame #3: 0x0000000101f04974 xdebug.so`xdebug_execute_ex(execute_data=0x00000001078324c0) at base.c:800:3
    frame #4: 0x00000001006c9339 php`ZEND_DO_FCALL_SPEC_OBSERVER_HANDLER(execute_data=0x0000000107832410) at zend_vm_execute.h:1938:4
    frame #5: 0x000000010070772b php`ZEND_USER_OPCODE_SPEC_HANDLER(execute_data=0x0000000107832410) at zend_vm_execute.h:3003:4
    frame #6: 0x000000010068438d php`execute_ex(ex=0x0000000107832410) at zend_vm_execute.h:54316:7
    frame #7: 0x0000000101f048f0 xdebug.so`xdebug_execute_ex(execute_data=0x0000000107832410) at base.c:789:2
    frame #8: 0x00000001006c9339 php`ZEND_DO_FCALL_SPEC_OBSERVER_HANDLER(execute_data=0x0000000107832160) at zend_vm_execute.h:1938:4
    frame #9: 0x000000010070772b php`ZEND_USER_OPCODE_SPEC_HANDLER(execute_data=0x0000000107832160) at zend_vm_execute.h:3003:4
    frame #10: 0x000000010068438d php`execute_ex(ex=0x0000000107832160) at zend_vm_execute.h:54316:7
    frame #11: 0x0000000101f048f0 xdebug.so`xdebug_execute_ex(execute_data=0x0000000107832160) at base.c:789:2
    frame #12: 0x00000001006c9339 php`ZEND_DO_FCALL_SPEC_OBSERVER_HANDLER(execute_data=0x0000000107832080) at zend_vm_execute.h:1938:4
    frame #13: 0x000000010070772b php`ZEND_USER_OPCODE_SPEC_HANDLER(execute_data=0x0000000107832080) at zend_vm_execute.h:3003:4
    frame #14: 0x000000010068438d php`execute_ex(ex=0x0000000107832080) at zend_vm_execute.h:54316:7
    frame #15: 0x0000000101f048f0 xdebug.so`xdebug_execute_ex(execute_data=0x0000000107832080) at base.c:789:2
    frame #16: 0x0000000100630846 php`zend_call_function(fci=0x0000000104dff850, fci_cache=0x0000000104dff890) at zend_execute_API.c:895:3
    frame #17: 0x000000010198ffad fiber.so`fiber_run_opcode_handler(exec=0x0000000107832030) at fiber.c:193:2
    frame #18: 0x0000000101f0c84c xdebug.so`xdebug_call_original_opcode_handler_if_set(opcode=200, execute_data=0x0000000107832030) at lib.c:562:11
    frame #19: 0x0000000101f21016 xdebug.so`xdebug_check_branch_entry_handler(execute_data=0x0000000107832030) at code_coverage.c:176:9
    frame #20: 0x0000000100707652 php`ZEND_USER_OPCODE_SPEC_HANDLER(execute_data=0x0000000107832030) at zend_vm_execute.h:2984:8
    frame #21: 0x000000010068438d php`execute_ex(ex=0x0000000107832030) at zend_vm_execute.h:54316:7
    frame #22: 0x0000000101f048f0 xdebug.so`xdebug_execute_ex(execute_data=0x0000000107832030) at base.c:789:2
    frame #23: 0x00000001019909f8 fiber.so`zend_fiber_run at fiber.c:169:2
    frame #24: 0x00000001019917ff fiber.so`zend_fiber_asm_start(trans=(ctx = 0x00007ffeefbfd3b0, data = 0x0000000104e65370)) at fiber_asm.c:64:2
    frame #25: 0x0000000101991d2f fiber.so`trampoline at make_x86_64_sysv_macho_gas.S:69
trace.txt (3,474 bytes)   

derick

2020-12-02 16:52

administrator   ~0005566

https://github.com/xdebug/xdebug/pull/701

Issue History

Date Modified Username Field Change
2020-11-21 18:02 trowski New Issue
2020-11-21 18:02 trowski File Added: trace.txt
2020-11-26 17:03 derick Target Version => 3.0dev
2020-11-26 20:01 derick Status new => confirmed
2020-12-02 16:52 derick Note Added: 0005566
2020-12-02 17:08 derick Assigned To => derick
2020-12-02 17:08 derick Status confirmed => closed
2020-12-02 17:08 derick Resolution open => fixed
2020-12-02 17:08 derick Fixed in Version => 3.0.1