Re: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752
| From: | Stas Malyshev | Date: | Thu, 20 Dec 2012 18:40:32 +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-64387@lists.php.net to get a copy of this message | ||
Hi!
> <?php
> if ($argv[1] > 0) {
> while ($argv[1]--) file_put_contents('test.tpl', "<?php
> #".str_repeat('A', mt_rand(4000, 5000))." ?>\n", LOCK_EX);
> } else {
> $p2 = popen("sapi/cli/php -n test3.php 100", "r");
> while (1) include 'test.tpl';
> }
> ?>
Yes, I can now reproduce this on my machine too. Not sure what I did
wrong last time, but now I get bus error. I suspect there's some race
condition between mmap and rewriting the file that creates the problem.
The error seems to happen at offset exactly 0x1000 from the start of the
map, which leads me to thinking that maybe the problem is that the page
needs to be loaded, but since the file is not there, being overwritten,
it can not be loaded anymore.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227