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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to