View Issue Details

IDProjectCategoryView StatusLast Update
0001304XdebugUncategorizedpublic2017-01-03 18:55
Reporterjonashaag Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformMacOSOS X 
Summary0001304: Segfault
Description

I don't have a minimal example to reproduce the crash, but I have used lldb to debug it. My findings are: Sometimes, xdebug_old_execute_ex(execute_data) will set op_array->filename to NULL (here: https://github.com/xdebug/xdebug/blob/606bf269d527a7c8c4b407f7c546df96b003670e/xdebug.c#L1893) and then xdebug_code_coverage_end_of_function(op_array) will crash when using strcmp on op_array->filename.

Additional Information

PHP 7.0.6 (cli) (built: Apr 29 2016 04:21:39) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

TagsNo tags attached.
Operating System
PHP Version7.0.5-7.0.9

Activities

jonashaag

2016-05-18 08:58

reporter   ~0003604

  • thread #1: tid = 0x3d3d4a, 0x00007fff85fd3855 libsystem_platform.dylib`_platform_strcmp + 85, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
    • frame #0: 0x00007fff85fd3855 libsystem_platform.dylib_platform_strcmp + 85 frame #1: 0x00000001010aaf41 xdebug.soxdebug_branch_info_mark_end_of_function_reached(filename=0x0000000000000018, function_name="{main}", key=0x0000000000000000, key_len=0) + 49 at xdebug_branch_info.c:417
      frame 0000002: 0x00000001010ac9fe xdebug.soxdebug_code_coverage_end_of_function(op_array=0x0000000104286d20) + 206 at xdebug_code_coverage.c:1003 frame #3: 0x00000001010a717f xdebug.soxdebug_execute_ex(execute_data=0x000000010161c4f0) + 2671 at xdebug.c:1895
      frame 0000004: 0x0000000100396de8 phpzend_call_function + 1590 frame #5: 0x00000001002adb22 phpzif_call_user_func_array + 255
      frame 0000006: 0x0000000100395804 phpdtrace_execute_internal + 129 frame #7: 0x00000001010a756b xdebug.soxdebug_execute_internal(current_execute_data=0x000000010161c470, return_value=0x000000010161c450) + 475 at xdebug.c:2035
      frame 0000008: 0x00000001003f3b55 phpZEND_DO_FCALL_SPEC_HANDLER + 695 frame #9: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000010: 0x000000010039573d phpdtrace_execute_ex + 238 frame #11: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161c370) + 2630 at xdebug.c:1890
      frame 0000012: 0x000000010041cf26 phpZEND_CALL_TRAMPOLINE_SPEC_HANDLER + 1027 frame #13: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000014: 0x000000010039573d phpdtrace_execute_ex + 238 frame #15: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161c370) + 2630 at xdebug.c:1890
      frame 0000016: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #17: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000018: 0x000000010039573d phpdtrace_execute_ex + 238 frame #19: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161c300) + 2630 at xdebug.c:1890
      frame 0000020: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #21: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000022: 0x000000010039573d phpdtrace_execute_ex + 238 frame #23: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161c020) + 2630 at xdebug.c:1890
      frame 0000024: 0x0000000100396de8 phpzend_call_function + 1590 frame #25: 0x000000010022c1c5 phpzim_reflection_method_invokeArgs + 713
      frame 0000026: 0x0000000100395804 phpdtrace_execute_internal + 129 frame #27: 0x00000001010a756b xdebug.soxdebug_execute_internal(current_execute_data=0x000000010161bfa0, return_value=0x000000010161bd20) + 475 at xdebug.c:2035
      frame 0000028: 0x00000001003f3b55 phpZEND_DO_FCALL_SPEC_HANDLER + 695 frame #29: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000030: 0x000000010039573d phpdtrace_execute_ex + 238 frame #31: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161bb60) + 2630 at xdebug.c:1890
      frame 0000032: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #33: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000034: 0x000000010039573d phpdtrace_execute_ex + 238 frame #35: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161b2a0) + 2630 at xdebug.c:1890
      frame 0000036: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #37: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000038: 0x000000010039573d phpdtrace_execute_ex + 238 frame #39: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161a940) + 2630 at xdebug.c:1890
      frame 0000040: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #41: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000042: 0x000000010039573d phpdtrace_execute_ex + 238 frame #43: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x000000010161a160) + 2630 at xdebug.c:1890
      frame 0000044: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #45: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000046: 0x000000010039573d phpdtrace_execute_ex + 238 frame #47: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101619ce0) + 2630 at xdebug.c:1890
      frame 0000048: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #49: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000050: 0x000000010039573d phpdtrace_execute_ex + 238 frame #51: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101619860) + 2630 at xdebug.c:1890
      frame 0000052: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #53: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000054: 0x000000010039573d phpdtrace_execute_ex + 238 frame #55: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101618630) + 2630 at xdebug.c:1890
      frame 0000056: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #57: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000058: 0x000000010039573d phpdtrace_execute_ex + 238 frame #59: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101618210) + 2630 at xdebug.c:1890
      frame 0000060: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #61: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000062: 0x000000010039573d phpdtrace_execute_ex + 238 frame #63: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101618120) + 2630 at xdebug.c:1890
      frame 0000064: 0x00000001003f3c78 phpZEND_DO_FCALL_SPEC_HANDLER + 986 frame #65: 0x00000001003e0f10 phpexecute_ex + 25
      frame 0000066: 0x000000010039573d phpdtrace_execute_ex + 238 frame #67: 0x00000001010a7156 xdebug.soxdebug_execute_ex(execute_data=0x0000000101618030) + 2630 at xdebug.c:1890
      frame 0000068: 0x00000001003e1142 phpzend_execute + 544 frame #69: 0x00000001003a46c2 phpzend_execute_scripts + 299
      frame 0000070: 0x000000010034ecc4 phpphp_execute_script + 804 frame #71: 0x000000010042eaaa phpdo_cli + 3699
      frame 0000072: 0x000000010042daaa phpmain + 1206 frame #73: 0x00007fff9061b5ad libdyld.dylibstart + 1

jonashaag

2016-05-18 08:59

reporter   ~0003605

Note that in the traceback above, in frame #1, filename=0x0000000000000018 is actually STR_NAME_VAL(NULL).

derick

2016-12-12 00:03

administrator   ~0004021

Is this still a problem with the latest PHP (7.0.14) and Xdebug 2.5.0?

derick

2017-01-03 18:55

administrator   ~0004137

I could not reproduce this, and no feedback was given. I'm closing this issue, but feel free to reopen if this happens again.

Issue History

Date Modified Username Field Change
2016-05-18 08:57 jonashaag New Issue
2016-05-18 08:58 jonashaag Note Added: 0003604
2016-05-18 08:59 jonashaag Note Added: 0003605
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)
2016-12-12 00:03 derick Note Added: 0004021
2016-12-12 00:03 derick Category (No Category) => Usage problems (Wrong Results)
2016-12-12 00:06 derick Assigned To => derick
2016-12-12 00:06 derick Status new => feedback
2017-01-03 18:55 derick Note Added: 0004137
2017-01-03 18:55 derick Status feedback => resolved
2017-01-03 18:55 derick Resolution open => unable to reproduce
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized