Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41472 invoked from network); 9 Nov 2016 15:10:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2016 15:10:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Received: from [82.113.146.227] ([82.113.146.227:48878] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/F2-15787-A4C33285 for ; Wed, 09 Nov 2016 10:10:03 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 6F71910C011; Wed, 9 Nov 2016 15:09:59 +0000 (GMT) Date: Wed, 9 Nov 2016 15:09:59 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: "Christoph M. Becker" cc: PHP Developers Mailing List , Dmitry Stogov , Nikita Popov In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] Re: PHP 5.6 static access valgrind issue From: derick@php.net (Derick Rethans) On Wed, 9 Nov 2016, Christoph M. Becker wrote: > On 09.11.2016 at 15:21, Derick Rethans wrote: > > 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? > > I'm going to see whether PHP 7.0 and 7.1 have a similar issue too. It seems like there is a similar issue in PHP 7.0 and 7.1 too, looking at the source. cheers, Derick