Array overflow when no array is used
Vincent Bernat
bernat@luffy.cx
Mon Sep 30 12:25:00 GMT 2013
❦ 30 septembre 2013 12:41 CEST, Vincent Bernat <bernat@luffy.cx> :
> For example:
>
> 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.
> typedef union _apc_cache_key_data_t {
> struct {
> apc_dev_t device; /* the filesystem device */
> apc_ino_t inode; /* the filesystem inode */
> } file;
> struct {
> const char *identifier;
> int identifier_len;
> } user;
> struct {
> const char *fullpath;
> int fullpath_len;
> } fpfile;
> } apc_cache_key_data_t;
Will such a structure be problematic for systemtap?
--
panic("mother...");
2.2.16 /usr/src/linux/drivers/block/cpqarray.c
More information about the Systemtap
mailing list