View Issue Details

IDProjectCategoryView StatusLast Update
0001036Xdebug(No Category)public2014-05-21 19:02
ReporteranfurnyAssigned Toderick 
Status resolvedResolutionunable to reproduce 
PlatformPHPOSMacOS Version10.8.5
Product Version 
Target VersionFixed in Version 
Summary0001036: Crashes with certain regex
Description$encoded = "test";
@preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded);

Crashes with a seg fault when xdebug is enabled only.
Steps To Reproduce$encoded = "test";
@preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded);
TagsNo tags attached.
Operating System
PHP Version5.5.0-5.5.4



2014-03-05 09:00

administrator   ~0002738

I can not reproduce this when I just run this script. Can you tell me a little bit on how to actually reproduce this issue? Can you also share the *XDEBUG PART* of your phpinfo() output (not the whole thing!)?


2014-03-05 19:39

reporter   ~0002762

Let me give more complete code. This terminates with SICSEGV maybe 1/5 times its run for me:

function handleError($code, $description, $file = null, $line = null, $context = null) {
    if (error_reporting() === 0) {
        return false;


$error = array(
    'handler' => 'ErrorHandler::handleError',
    'level' => E_ALL & ~E_DEPRECATED,

$encoded = "test";
    "'='.sprintf('%02X', ord('\\1'))", $encoded);


2014-03-05 19:41

reporter   ~0002763


xdebug support enabled
Version 2.3.0dev
IDE Key session_name

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $

Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.file_link_format no value no value
xdebug.idekey session_name session_name
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /tmp /tmp
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back On On
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable On On
xdebug.remote_handler dbgp dbgp
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /tmp /tmp
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3


2014-05-19 23:40

administrator   ~0002831

I still can't reproduce this. Does it segfault on the CLI? Can you make a backtrace? See on how to do that.


2014-05-21 17:38

reporter   ~0002839

Since upgrading to the newest xdebug this issue has gone away. Thanks and sorry for not doing that first.


2014-05-21 19:02

administrator   ~0002840

All right, that's not a problem. Closing this then.

Issue History

Date Modified Username Field Change
2014-03-05 00:00 anfurny New Issue
2014-03-05 09:00 derick Note Added: 0002738
2014-03-05 09:00 derick Assigned To => derick
2014-03-05 09:00 derick Status new => feedback
2014-03-05 19:39 anfurny Note Added: 0002762
2014-03-05 19:39 anfurny Status feedback => assigned
2014-03-05 19:41 anfurny Note Added: 0002763
2014-05-19 23:40 derick Note Added: 0002831
2014-05-19 23:40 derick Status assigned => feedback
2014-05-21 17:38 anfurny Note Added: 0002839
2014-05-21 17:38 anfurny Status feedback => assigned
2014-05-21 19:02 derick Note Added: 0002840
2014-05-21 19:02 derick Status assigned => resolved
2014-05-21 19:02 derick Resolution open => unable to reproduce
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)