Re: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752
| From: | Patrick Schaaf | Date: | Fri, 21 Dec 2012 08:53:18 +0000 |
| Subject: | Re: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64404@lists.php.net to get a copy of this message | ||
On Thursday 20 December 2012 23:23:43 Stas Malyshev wrote:
> Hi!
>
> > Is include supposed to take a LOCK_EX somehow? I can neither see that in
> > php- src (5.4.9) nor APC-trunk, doing a cursory grepping.
>
> I'm not sure how any lock would help, since locks are optional, meaning
> you still can do the same thing without the locks.
I'm well aware of the advisory nature of file locks. include taking a LOCK_EX
could have helped - when any .tpl file modifying code also does LOCK_EX.
I do NOT want to propose include doing that!
It's just that the original poster or whoever created that piece of code with
LOCK_EX in the file_put_contents(), apparently thought it might work out that
way.
tmpfiles and rename are definitely the correct way to handle that.
best regards
Patrick