Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9256 invoked from network); 22 Dec 2015 20:00:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2015 20:00:48 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 68.114.190.28 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 68.114.190.28 mtaout003-public.msg.strl.va.charter.net Received: from [68.114.190.28] ([68.114.190.28:51375] helo=mtaout003-public.msg.strl.va.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/70-51216-0FBA9765 for ; Tue, 22 Dec 2015 15:00:48 -0500 Received: from impout002 ([68.114.189.17]) by mtaout003.msg.strl.va.charter.net (InterMail vM.9.00.021.00 201-2473-182) with ESMTP id <20151222200045.BNGI22826.mtaout003.msg.strl.va.charter.net@impout002>; Tue, 22 Dec 2015 14:00:45 -0600 Received: from pc1 ([97.87.188.16]) by impout002 with charter.net id wk0k1r00B0Mfu3D01k0kPs; Tue, 22 Dec 2015 14:00:45 -0600 X-Authority-Analysis: v=2.1 cv=Y5B2s3uN c=1 sm=1 tr=0 a=Ay788ph35uAhBIV2K373vw==:117 a=Ay788ph35uAhBIV2K373vw==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=IkcTkHD0fZMA:10 a=0Atm9t1T_qrKuuzl4awA:9 a=QEXdDO2ut3YA:10 Message-ID: To: "Dmitry Stogov" Cc: "PHP internals list" , "Lior Kaplan" , "Andrea Faulds" References: <8E.46.23339.4FA22565@pb1.pair.com><4342ECED904143CD9AC7AA35F2F1481B@pc1> Date: Tue, 22 Dec 2015 14:00:44 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [PHP-DEV] Re: Mysterious crashes (WAS: Re: Pear fetch script problem on PHP 7.0) From: php_lists@realplain.com ("Matt Wilmas") Hi Dmitry! ----- Original Message ----- From: "Dmitry Stogov" Sent: Tuesday, December 22, 2015 > Hi Matt, > > On Tue, Dec 22, 2015 at 8:36 PM, Matt Wilmas > wrote: > >> Hi all, >> >> Lior, which compiler are you using? You can still reproduce the problem? >> Can you run it through Valgrind? >> >> I'm getting random crashes I can't figure out on 64-bit Linux after just >> making a very trivial change. :-/ The backtrace is the same up to >> compile_file() (although maybe that doesn't mean much? hmm). >> >> Dmitry, to reproduce, just add another GLOBAL REGISTER variable to >> zend_vm_execute, and then set it in execute_ex(). An empty file will >> crash >> it. It does NOT crash with --enable-debug, nor with certain combinations >> of optimization level and global register. >> > > Using another global register is not a trivial change. Well, I meant relatively since a couple are already used. ;-) And thought GCC managed it all... (wrong). >> %r12 with -O2 seems to consistently fail, but with -O3 it might be %r13, >> etc. >> > > In general both should work fine, but it seems like this feature is not > well debugged in GCC and may lead to miscompilation. Right, I remember you requiring min. 4.8 back in the spring after issues with earlier versions. And now I wondered if something was still unstable and only working by chance. >> Now, the question: Is that little change triggering a bug in GCC 4.8? Or >> is it somehow revealing a PHP problem?! >> > > It may be a GCC bug, as well as a bug in your code... > may be you need to save/restore it manually in execute_ex()? Argh!! Do I feel dumb. :-( And that's even what's happening right there with the others. (I was thinking of those as executor-specific save/restore, rather than the registers themselves.) And seems I had it reversed thinking the caller would save its own first, which of course is wrong for CALLEE-saved regs. Looks like any combo is working fine now. I had the changes as a whole all working quickly (will reply to your previous subject soon) by luck. I tried everything else after crashes started... Who knows how long it would've taken if not for your reminder! :-) > Thanks. Dmitry. Thanks again, and sorry for the noise. - Matt