[xdebug-general] Re: Segmentation-fault in xdebug.so from pkgtools (PHP7?)

From: Derick Rethans <derick[@]xdebug.org>
Date: Wed, 27 Jan 2016 09:28:38 +0000 (GMT)

On Tue, 26 Jan 2016, Nish Aravamudan wrote:

> [ I would have filed this as a bug on http://bugs.xdebug.org, but the
> captcha is not loading for me. ]

I have fixed that now.

> I am working on helping vet PHP7.0 in Ubuntu Xenial, potentially, and am
> hitting the following issue with a recompiled (so as to pull in the PHP7
> dependencies) pkgtools program (using
> http://anonscm.debian.org/cgit/pkg-php/pkg-php-tools.git/log/?h=master-7.0):
>
> pkgtools
> Usage:
> pkgtools COMMAND
>
> Options:
> --help: print help
> -h: print help
> --verbose: increase verbosity
> -v: increase verbosity
> --sourcedirectory: set source directory
> -D: set source directory
>
> Commands:
> : Without arguments: print help
> Segmentation fault (core dumped)
>
> The segfault is actually in xdebug.so:
>
> line 1150 in xdebug_stack.c:
>
> } else if (edata && edata->prev_execute_data && edata->prev_execute_data->opline && edata->prev_execute_data->opline->opcode == ZEND_INCLUDE_OR_EVAL) {
>
> I am able to use gdb in a chroot and see:
>
> (gdb) print *edata->prev_execute_data
> $7 = {opline = 0x3, call = 0x4, return_value = 0x0, func = 0xfbcd80, This = {
> value = {lval = 0, dval = 0, counted = 0x0, str = 0x0, arr = 0x0,
> obj = 0x0, res = 0x0, ref = 0x0, ast = 0x0, zv = 0x0, ptr = 0x0,
> ce = 0x0, func = 0x0, ww = {w1 = 0, w2 = 0}}, u1 = {v = {type = 8 '\b',
> type_flags = 12 '\f', const_flags = 0 '\000', reserved = 2 '\002'},
> type_info = 33557512}, u2 = {var_flags = 1, next = 1, cache_slot = 1,
> lineno = 1, num_args = 1, fe_pos = 1, fe_iter_idx = 1}},
> called_scope = 0x7ffff3203018, prev_execute_data = 0x7ffff3213f20,
> symbol_table = 0x7ffff327d090, run_time_cache = 0x40000c08,
> literals = 0x1069c20}
>
> where opline is pretty clearly invalid (comparing to other
> prev_executed_data pointers in the chain).
>
> I'm happy to provide more output from gdb, but not really sure where to
> start :)

Can you instead provide the script to run, and exact steps on how to
reproduce this? That includes command line arguments, exact PHP and
Xdebug versions, etc.

cheers,
Derick

-- 
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
Received on Wed Jan 27 2016 - 09:28:38 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST