<snip>And running it with "valgrind php -n index.php", produces:
root@debian-8-64bit:/home/derick/xdebug-issue-1185# valgrind php -n index.php ==760== Memcheck, a memory error detector ==760== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==760== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==760== Command: php -n index.php ==760== ==760== Conditional jump or move depends on uninitialised value(s) ==760== at 0x797992: zend_std_get_static_method (zend_object_handlers.c:1261) ==760== by 0x7B66FE: ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:3887) ==760== by 0x7A379F: execute_ex (zend_vm_execute.h:363) ==760== by 0x76E2AF: zend_execute_scripts (zend.c:1341) ==760== by 0x70CC87: php_execute_script (main.c:2613) ==760== by 0x81A990: do_cli (php_cli.c:998) ==760== by 0x431996: main (php_cli.c:1382) ==760==
zend_std_get_static_method() declares use_heap[1] (if there's support
for alloca), but doesn't initialize it with SET_ALLOCA_FLAG()[2]. It
seems to me that ALLOCA_FLAG()[3] should be defined like so:define ALLOCA_FLAG(name) \
zend_bool name = 0;
That sounds about right - Dmitry, Nikita?
This shouldn't be a problem. alloca is only used in the !key branches, in
which case the flag is initialized by do_alloca.However, it is a problem as my valgrind note says. However, I wouldn't
be surprised if this was a (Debian) GCC bug. I can't reproduce this when
I change -O2 to -O0 in the Makefile.In the past, I have found a similar issue in Xdebug, where it was really
something Xdebug was doing wrong, but in a very vague way
(https://github.com/xdebug/xdebug/commit/c36ea38141cb9403ff4bf72602fcf4ae62e5ba1e).However, right now, it's a bug with this GCC version.
This is possible.
In this backtracked "key" has to be not NULL, and the line 1261 shouldn't be reached at all.
Thanks. Dmitry.
cheers,
Derick--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug
<snip>And running it with "valgrind php -n index.php", produces:
root@debian-8-64bit:/home/derick/xdebug-issue-1185# valgrind php -n index.php ==760== Memcheck, a memory error detector ==760== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==760== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==760== Command: php -n index.php ==760== ==760== Conditional jump or move depends on uninitialised value(s) ==760== at 0x797992: zend_std_get_static_method (zend_object_handlers.c:1261) ==760== by 0x7B66FE: ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:3887) ==760== by 0x7A379F: execute_ex (zend_vm_execute.h:363) ==760== by 0x76E2AF: zend_execute_scripts (zend.c:1341) ==760== by 0x70CC87: php_execute_script (main.c:2613) ==760== by 0x81A990: do_cli (php_cli.c:998) ==760== by 0x431996: main (php_cli.c:1382) ==760==
zend_std_get_static_method() declares use_heap[1] (if there's support
for alloca), but doesn't initialize it with SET_ALLOCA_FLAG()[2]. It
seems to me that ALLOCA_FLAG()[3] should be defined like so:define ALLOCA_FLAG(name) \
zend_bool name = 0;
That sounds about right - Dmitry, Nikita?
This shouldn't be a problem. alloca is only used in the !key branches, in
which case the flag is initialized by do_alloca.However, it is a problem as my valgrind note says. However, I wouldn't
be surprised if this was a (Debian) GCC bug. I can't reproduce this when
I change -O2 to -O0 in the Makefile.In the past, I have found a similar issue in Xdebug, where it was really
something Xdebug was doing wrong, but in a very vague way
(https://github.com/xdebug/xdebug/commit/c36ea38141cb9403ff4bf72602fcf4ae62e5ba1e).However, right now, it's a bug with this GCC version.
This is possible. In this backtracked "key" has to be not NULL, and
the line 1261 shouldn't be reached at all.
No, but it does, and I think this is something we should look at
addressing, as it's a bog standard Debian install.
cheers,
Derick