This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Array overflow when no array is used
- From: Vincent Bernat <bernat at luffy dot cx>
- To: systemtap at sourceware dot org
- Date: Mon, 30 Sep 2013 16:04:52 +0200
- Subject: Re: Array overflow when no array is used
- Authentication-results: sourceware.org; auth=none
- References: <8738omd222 dot fsf at guybrush dot luffy dot cx> <87wqlybio8 dot fsf at guybrush dot luffy dot cx>
â 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)