Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103147 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35636 invoked from network); 10 Sep 2018 03:31:52 -0000 Received: from unknown (HELO mout.gmx.net) (212.227.15.19) by pb1.pair.com with SMTP; 10 Sep 2018 03:31:52 -0000 Received: from [192.168.2.133] ([91.8.166.159]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAyZg-1g6oDp1g28-009whc; Mon, 10 Sep 2018 01:35:49 +0200 To: Stanislav Malyshev , internals@lists.php.net, Xinchen Hui References: <4a33e4e8-c72d-6101-8999-366391c78721@php.net> <0849021d-397d-d0e9-9f51-9e39ed97f549@gmail.com> Message-ID: Date: Mon, 10 Sep 2018 01:35:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <0849021d-397d-d0e9-9f51-9e39ed97f549@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:N0qibR7fnpXuwzZ2rGD4hga1/LXZ+2mb3QCpq9Qm6U2Gdbyv3DR NPr6gruNR05Vr/TVvsu4M9X+QR3ImmylVrv51QvdZ22tZLgpEFAzacFX67iPaBPhum1etoU kPUi9q/tc+hNfaQYY0A6CxWQ9e077e8BwKrOtcOK1SkgAB0dPSnXCuV/pDxD33om8nWqqKB I4O1KbVLILmoc9HoLveMQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:WIr5Zatb0FU=:4Fru6GOrrbsNbVERqXr4oG t6DgcgSupzwUV4Ai8MhiTc7Kt7qIy1zTlcGQflYnoXPtjGAQ63FgOuol/6td/Ls6jAT/dcU3A s/vKA9Szo0TR/i4ofhh3bHv7x07g++Qtg7wbr/Zo5Ke82D9RAdNHM95Yh131UCxiagm/SLC9q rutO3Y07Sn/3IIcW+ClxaN3HurwUEEwoK8S2c5O5k0EMfBbMJU0VwfaLmWZzsLot62L8hy0v1 3T3MY8hZy4IHNYQNTCIjfHT8TJhNsSzMcfFj+rFyWlOsbDWjz5asgAQN4UjM3qoYfdj/kpGd4 ndgvSrjU0BQsXAG1sWz5moVt7Su5fWtTqDdUTskX1yTTT3CywN9foienc+Svqsd6c1OeSQnCf Pfm7upa8mvVFvLlxuuuYpSAkLsecd413JF7i5PvxwXD22yL8bt/geleIbNS3Euf2Hc6G5p4vU b4797y1aqI33Fa6NTHRG+77b408SoDcmWRntNaF1xrDFw65C9qbvCrnOD0pMuahhizlKihbnA LgmdebZGljUmm8iFCO39EdULTvhpJEJCMTHnS3pO8pI+QpzjOM3xx+2YzuosRSSN448EpDuxH 5Tj2VIAgAHZq41Tw4vt3kzi5GpTaOB9wDX8Zvt0VXGkr18lfA2wt7gD/Hyu8C43SnTl3C131Z 8tS/OLROkP68ENaq6GPNFcNCPnO/THKfJEBCQ8i4AHpo1srmKzizwOIOffg3w+veBN7dQq//k 6M4C596u9CAQtR3ChoSRm85WRLSJJszjJSMHZcAH2Qe18NIb3emCGxyUQfNpfWFfHYLQvzhoe yXetuLO Subject: Re: [PHP-DEV] GCC -foptimize-strlen and bug #76510 From: cmbecker69@gmx.de ("Christoph M. Becker") On 09.09.2018 at 22:28, Stanislav Malyshev wrote: > So, I am still not sure what the course of action for #76510 is. It's > still not fixed, original author of the patch (Xinchen Hui) did not > respond to comments on > https://github.com/php/php-src/commit/513b0093c2b480bb752fb354012f42c446769486 > and we still have 7.3 with non-working phar. I don't think it's possible > to release it this way, but I got pushback from some people about > reverting it. So, what's the alternative course of action? There does not appear to be anything wrong with this commit. There is simply a bug in the strlen() optimization of GCC 8[1] (it didn't recognize the `char c[1]` struct hack, and optimized strlen(…+1) to 0), which is already fixed in GCC, and in the progress of being rolled out to distros[2]. I have already suggested to add a respective check to configure[3], and if the check fails, to disable `optimize-strlen`. My autoconf-fu is weak, though, so I hope someone will come up with a patch. Otherwise we could simply disable `optimize-strlen` for GCC 8 unconditionally until we have a better workaround. The valgrind issues that came up in the bug report still need further investigation. The invalid reads caused by allocations in lex_scan()'s callees are definitely related to doc blocks; I don't know where the conditional jump or move depending on uninitialised value(s) stem from, though (help of engine and SPL experts, respectively, would be appreciated). Anyhow, there is no hint so far that these have been introduced with the mentioned commit, so “not guilty till proven otherwise” should apply. In other words, I don't see any reason to revert (parts of) the mentioned commit. [1] [2] [3] -- Christoph M. Becker