View Issue Details

IDProjectCategoryView StatusLast Update
0001220XdebugUncategorizedpublic2016-01-25 21:59
Reporterakrabat Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPHP 7.0.0 RC8OSOS XOS Version10.11.1
Fixed in Version2.4.0rc4 
Summary0001220: Segmentation fault if var_dump() output is too large
Description

If you generate a very large var_dump() output, say by var_dump($this->getEventManager()); in the ZF2 Skeleton Application's IndexController::indexAction(), then xdebug will segfault.

Additional Information

GDB output when debugging with Derick: https://gist.github.com/akrabat/d470a3e8b646c20f78d5

This indicated that the xdebug_str struct in xdebug_str.h needed to be changed to:

typedef struct xdebug_str {
signed long l;
signed long a;
char *d;
} xdebug_str;

from

typedef struct xdebug_str {
int l;
int a;
char *d;
} xdebug_str;

TagsNo tags attached.
Operating SystemOS X 10.11.1
PHP Version7.0.0rc7

Activities

akrabat

2015-12-02 12:23

reporter   ~0003277

The way I found this:

$ composer create-project -n -sdev zendframework/skeleton-application skelly
$ cd skelly

Edit module/Application/src/Application/Controller/IndexController.php

Update indexAction so that it looks like this:

public function indexAction()
{
    var_dump($this->getEventManager());exit;
    return new ViewModel();
}

$ php -S 0.0.0.0:8888 -t public public/index.php

in a separate console:

$ curl -s http://localhost:8888/ > output.txt

derick

2015-12-15 21:37

administrator   ~0003350

Can't promise it really works, but you might just get the process killed by OOM if you're doing it wrong™.

Issue History

Date Modified Username Field Change
2015-11-30 21:09 akrabat New Issue
2015-12-02 12:23 akrabat Note Added: 0003277
2015-12-15 21:37 derick Note Added: 0003350
2015-12-15 21:37 derick Status new => closed
2015-12-15 21:37 derick Assigned To => derick
2015-12-15 21:37 derick Resolution open => fixed
2015-12-15 21:37 derick Fixed in Version => 2.4.0
2016-01-25 21:59 derick Fixed in Version 2.4.0 => 2.4.0rc4
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized