Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96806 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24331 invoked from network); 10 Nov 2016 08:05:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2016 08:05:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 104.47.42.101 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.42.101 mail-by2nam03on0101.outbound.protection.outlook.com Received: from [104.47.42.101] ([104.47.42.101:3456] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/5E-15787-65A24285 for ; Thu, 10 Nov 2016 03:05:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=E/V8EOj74coTb3HtwQh490CYm4ijSJahJcI2QPzKz/Q=; b=4QzJv1Q+I+9xAHhfOOgP65aWmBKkrqzj+ur68kIRkoimNxz62miSCmvgGWAWF8+TcEUIIRfDOKpP9xuKLDa5r+5XDMcqaHHUQTdWycMHWTaf/900dlsIQKBIqIzkxi41qnWiZaRT2Xk9mrW4v39s7k4SDFTAuNRQ19pOO/gBGqA= Received: from MWHPR02MB2477.namprd02.prod.outlook.com (10.168.204.147) by MWHPR02MB2477.namprd02.prod.outlook.com (10.168.204.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Thu, 10 Nov 2016 08:05:38 +0000 Received: from MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) by MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) with mapi id 15.01.0659.035; Thu, 10 Nov 2016 08:05:38 +0000 To: Derick CC: "Christoph M. Becker" , "nikita.ppv@gmail.com" , Dmitry Stogov , "PHP Developers Mailing List" Thread-Topic: [PHP-DEV] Re: PHP 5.6 static access valgrind issue Thread-Index: AQHSOyiMcDSopzjwP0+BjGziLk/DYg== Date: Thu, 10 Nov 2016 08:05:38 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [92.62.57.172] x-microsoft-exchange-diagnostics: 1;MWHPR02MB2477;6:HMCIKDSb2RnpmmpWpnrB6F9LUnRHd+UoarwO3E+Riw76DgiXm3jy54PCUI5eQXYQ4KRdH5q0Q65Gp2pIRoROpzntGD+X9l1wWgWGjAzNP8msULMsy0QePrYqddYmenLe7BR2YEpPiT2OGynD2ibSo1M7NrHi+KtYmIyeHvcFKm7X4bNtubY9TNxOkpp+E/x4Kg464EQAqLhZscr6JUGpTzn2Auj0KhDB4YKOhvqwIHOuuiTWPxmQpceMOfMc0xogA2WoIhZgbGOT9r/Y5ZGOi86LzpzGTnX1XPqf/Zrhmto7Kwi4O2gIh86WkEf5bJGc;5:8WuqWTPlS7Ra+SMr+whozQhpSM9rp+SA6og+Juh8rCax1dEcz8azemRdiOunkXyfvxwgFXJdq+LQ0NJrdrWpI++L4zPESIEMEwNblSJy9x79WZvBK/hJnjCXrzCKelafJm4gfP3yqRiugWFOtlPJ4w==;24:s/7RPrig3pLhvuDzGhS7XAox0E5VEeq4KiCccRkbGCDUJYc7TEZZFHz7wZnCzMePEuyJU2gBuZTKi6ZJ4/8eUTdhJLf5ZLRVh5aZ3xKGihE=;7:jpEEI35b4wIUeaKFIDZPhSLA99cadqhr+XdiN2l6lojQyFeX8s0MGAsGWz7WxDibZlk8+ZnJHXb4Geo3VYyUXcS0zgtqrs4B4dqMUp0BjXcuKckUWUGQUsy7WjquVNl6TDSmbyB4S6x6zdcbm+LvojYx5mUhjGFhaj2gWpXYsW80VUfKH53/66jpc9khUqzIEHslvRQL09aRNWr0DLeC+XCrocm0sAfDqOHthwxlW0wOldAK4TboVR4IZFHNWOP2U128PEFXfRoLDK+TPsIjGgaBavQ7DfcHoxNzcQqUV+ADE9eLfXYGuheeZ02GqvWx++A71z6kaDNIHnJQneqSAxJIT8Yp+AGLFHF/9J/4YKQ= x-ms-office365-filtering-correlation-id: afa27246-b9a0-4520-de21-08d409405bd3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR02MB2477; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(148322886591682)(166708455590820); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:MWHPR02MB2477;BCL:0;PCL:0;RULEID:;SRVR:MWHPR02MB2477; x-forefront-prvs: 01221E3973 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(377454003)(24454002)(189002)(199003)(2900100001)(3280700002)(7696004)(54356999)(86362001)(50986999)(9686002)(77096005)(74316002)(81156014)(7736002)(305945005)(76576001)(110136003)(87936001)(81166006)(102836003)(122556002)(6116002)(97736004)(66066001)(16799955002)(5660300001)(7846002)(6916009)(2906002)(8676002)(3660700001)(101416001)(8666005)(3846002)(33656002)(4326007)(105586002)(8936002)(99286002)(68736007)(92566002)(229853002)(189998001)(106116001)(586003)(106356001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR02MB2477;H:MWHPR02MB2477.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_MWHPR02MB24775CAE7A5EE8AB12773C7DBFB80MWHPR02MB2477namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2016 08:05:38.8420 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2477 Subject: Re: [PHP-DEV] Re: PHP 5.6 static access valgrind issue From: dmitry@zend.com (Dmitry Stogov) --_000_MWHPR02MB24775CAE7A5EE8AB12773C7DBFB80MWHPR02MB2477namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Nov 9, 2016 20:45, Derick Rethans wrote: > > On Wed, 9 Nov 2016, Nikita Popov wrote: > > > On Wed, Nov 9, 2016 at 4:09 PM, Derick Rethans wrote: > > > > > 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 > > > > > =3D=3D760=3D=3D Memcheck, a memory error detector > > > > > =3D=3D760=3D=3D Copyright (C) 2002-2013, and GNU GPL'd, by Ju= lian Seward et al. > > > > > =3D=3D760=3D=3D Using Valgrind-3.10.0 and LibVEX; rerun with = -h for copyright info > > > > > =3D=3D760=3D=3D Command: php -n index.php > > > > > =3D=3D760=3D=3D > > > > > =3D=3D760=3D=3D Conditional jump or move depends on uninitial= ised value(s) > > > > > =3D=3D760=3D=3D at 0x797992: zend_std_get_static_method (z= end_object_handlers.c:1261) > > > > > =3D=3D760=3D=3D by 0x7B66FE: ZEND_INIT_STATIC_METHOD_CALL_= SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:3887) > > > > > =3D=3D760=3D=3D by 0x7A379F: execute_ex (zend_vm_execute.h= :363) > > > > > =3D=3D760=3D=3D by 0x76E2AF: zend_execute_scripts (zend.c:= 1341) > > > > > =3D=3D760=3D=3D by 0x70CC87: php_execute_script (main.c:26= 13) > > > > > =3D=3D760=3D=3D by 0x81A990: do_cli (php_cli.c:998) > > > > > =3D=3D760=3D=3D by 0x431996: main (php_cli.c:1382) > > > > > =3D=3D760=3D=3D > > > > > > > zend_std_get_static_method() declares use_heap[1] (if there's suppo= rt > > > > 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 =3D 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/c36ea38141cb9403ff4bf72602fcf4ae= 62e5ba1e). > > 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 b= e 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 --_000_MWHPR02MB24775CAE7A5EE8AB12773C7DBFB80MWHPR02MB2477namp_--