View Issue Details

IDProjectCategoryView StatusLast Update
0001220XdebugUncategorizedpublic2016-01-25 21:59
Reporterakrabat Assigned To 
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™.