Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29586 invoked from network); 21 Dec 2012 09:59:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2012 09:59:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=jani.ollikainen@mmd.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jani.ollikainen@mmd.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mmd.net from 80.83.1.197 cause and error) X-PHP-List-Original-Sender: jani.ollikainen@mmd.net X-Host-Fingerprint: 80.83.1.197 dyn-197.hel.mmd.net Received: from [80.83.1.197] ([80.83.1.197:40952] helo=smtp.pronetko.fi) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/96-20281-2E234D05 for ; Fri, 21 Dec 2012 04:59:00 -0500 Received: from [10.0.0.7] (k7.pronetko.fi [::ffff:10.0.0.7]) (AUTH: PLAIN bestis@pronetko.fi, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by smtp.pronetko.fi with ESMTPSA; Fri, 21 Dec 2012 11:49:43 +0200 id 000000000109800E.50D430B7.00006C4F Message-ID: <50D43307.8060704@mmd.net> Date: Fri, 21 Dec 2012 11:59:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: internals@lists.php.net References: <50D1D9B9.4060505@mmd.net> <5952719.MaJMSR3yMW@rofl> <50D420D7.7030203@mmd.net> <2081737.rfJYvbmhGA@rofl> In-Reply-To: <2081737.rfJYvbmhGA@rofl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752 From: jani.ollikainen@mmd.net (Jani Ollikainen) Hi, On 21.12.2012 11:24, Patrick Schaaf wrote: > I understand your sentiment. And I try to understand your technical point of view. I've thought that PHP handles concurrent stuff so that those kind of things won't happen and the user won't need to have for example mutexes to do stuff. But I think I've been wrong and for performance sake there isn't stuff like that. I understood you correctly using temp file and then rename should fix that? Like this? 0) { while ($argv[1]--) { file_put_contents('test.tpl.tmp', "\n", LOCK_EX); rename('test.tpl.tmp','test.tpl'); } } else { $p2 = popen("php test3.php 100", "r"); while (1) include 'test.tpl'; } ?> Tested that quickly and cannot get it to do bus error. Or how should you then do that stupid example so that it won't crash? It might maybe help me, to find something in my production code to fix and get rid of the problem. But I think that include/require should have warning box saying something about including/requiring files that you might overwrite in other instance as I can't be only one expecting PHP to handle these kind of situations.