Array overflow when no array is used
Vincent Bernat
bernat@luffy.cx
Mon Sep 30 14:04:00 GMT 2013
❦ 30 septembre 2013 14:25 CEST, Vincent Bernat <bernat@luffy.cx> :
>> probe process("/usr/lib/php5/20090626/apc.so").function("apc_cache_make_file_key").return {
>> printf("%p\n", $key);
>> }
>>
>> I get some values and a few seconds later, I get:
>>
>> ERROR: Array overflow, check MAXMAPENTRIES near identifier '$key' at ./apc-cache-miss.stp:4:20
>>
>> Where does it get an array?
>
> I have looked at the generated code and discovered that local variables
> are in fact a map keyed by TID. Since I have many concurrent processes,
> I just increased MAXMAPENTRIES to get rid of the error. The error
> message is quite unclear in this case.
>
> I now needs to investigate why I get bad values for $key in some
> cases.
It seems that function().return is quite unreliable: it is not reliably
called and when it is, data when can fetch from there is bogus, most of
the time.
--
Take care to branch the right way on equality.
- The Elements of Programming Style (Kernighan & Plauger)
More information about the Systemtap
mailing list