On 10/29/2012 06:57 AM, Gopal Vijayaraghavan wrote:
>>> I've found that it behaves rather inconsistently when people start
>>> returning values from scripts.
>>>
>>> <?php
>>> function f($a = array(1)) { return $a; }
>>> return f();
>>>
>>> has been a suspect case for some segvs.
>>
>> Sorry, I didn't understand. Do you mean my change to include_once
>> override is causing new segvs or are you saying in general our
>> include_once override implementation has historically had problems?
>
> Yes, it has had troubles with people who return data from main scripts
> with inclusion.
I haven't seen that recently. If we have a reproducable case for this it
doesn't sound like it would be hard to fix.
>> I'd love to hear your suggestion for a simpler non-override way to solve
>> this particular inconsistency. Clearly the way the included_files check
>> is done currently is not ideal and I don't really see how we can solve
>> this in APC without doing an override since the actual check is done in
>> PHP's include_once code.
>
> I'd marked include_once_override for eventual deletion in my head, but
> I will give this a bit more thought.
>
> I suspect that the apc file stack - APCG(cache_stack) might be a better
> source for include once override instead of going & hitting the lock again
> with a find(). But that would need a look-up optimized structure.
Well, an optimization could be to re-use the cache_entry on the actual
compile, but for now this implementation seems to be working quite well
actually. It has the added benefit of removing the call to VCWD_REALPATH().
-Rasmus
--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php