Re: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

From: Date: Fri, 21 Dec 2012 09:59:35 +0000
Subject: Re: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-64408@lists.php.net to get a copy of this message
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? <?php if ($argv[1] > 0) { while ($argv[1]--) {
        file_put_contents('test.tpl.tmp', "<?php #".str_repeat('A', mt_rand(4000, 5000))." ?>\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.

« previous php.internals (#64408) next »