This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/10001] New: 32-bit map error "array subscript is above array bounds"
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 25 Mar 2009 01:58:38 -0000
- Subject: [Bug runtime/10001] New: 32-bit map error "array subscript is above array bounds"
- Reply-to: sourceware-bugzilla at sourceware dot org
On kernel 2.6.29-0.258.rc8.git2.fc11.i686.PAE, I get an error from
systemtap.base/overload.exp. I distilled the triggering script down to the
following:
# stap -e 'global k; probe begin { k["foo"] = 0 }' --vp 0002
Running make -C "/lib/modules/2.6.29-0.258.rc8.git2.fc11.i686.PAE/build"
M="/tmp/stapQJkCVd" modules >/dev/null
cc1: warnings being treated as errors
/tmp/stapQJkCVd/stap_f59c71419a2c37ad1f014c89e1bd68e4_372.c: In function
?probe_1383?:
/usr/src/kernels/2.6.29-0.258.rc8.git2.fc11.i686.PAE/arch/x86/include/asm/string_32.h:75:
error: array subscript is above array bounds
make[1]: *** [/tmp/stapQJkCVd/stap_f59c71419a2c37ad1f014c89e1bd68e4_372.o] Error 1
make: *** [_module_/tmp/stapQJkCVd] Error 2
Pass 4: compiled C into "stap_f59c71419a2c37ad1f014c89e1bd68e4_372.ko" in
1310usr/1370sys/7652real ms.
Pass 4: compilation failed. Try again with another '--vp 0001' option.
Running rm -rf /tmp/stapQJkCVd
The generated code is:
160 (void)
161 ({
162 c->last_stmt = "identifier 'k' at <input>:1:25";
163 l->__tmp2 = ((int64_t)0LL);
164 { int rc = _stp_map_set_si (global.s_k, "foo", l->__tmp2); if
(unlikely(rc)) { c->last_error = "Array overflow, check MAXMAPENTRIES"; goto
out; }};
165 ((int64_t)0LL);
166 });
And the relevant excerpt from asm/string_32.h:
51 static __always_inline void *__constant_memcpy(void *to, const void *from,
52 size_t n)
53 {
54 long esi, edi;
55 if (!n)
56 return to;
57
58 switch (n) {
[...]
73 case 5:
74 *(int *)to = *(int *)from;
75 *((char *)to + 4) = *((char *)from + 4);
76 return to;
The important factor seems to be the length of the key = 3. Keys of length 2
also show the same error on line 75. Lengths 1 or 4+ seem to have no issue.
The same kernel on x86_64 works fine.
--
Summary: 32-bit map error "array subscript is above array bounds"
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: runtime
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: jistone at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10001
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.