This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/10001] 32-bit map error "array subscript is above array bounds"


------- Additional Comments From wenji dot huang at oracle dot com  2009-03-26 01:57 -------
(In reply to comment #2)
> I'm using rawhide's gcc-4.4.0-0.23.i586.

Please check the compiler using the example code in gcc bug38480

foo.c

unsigned short foobar;
int array[100];

void g(unsigned short j) {
  if (j < 100)
    array[j]++;
}

void f() {
  int i = foobar;
  if (i >= 100)
    g(foobar);
}

# gcc -O3 -Wall -c foo.c

In my machine RHEL5U3,  outputs:
$ gcc34 -O3 -Wall -c foo.c
$ gcc -O3 -Wall -c foo.c
$ gcc43 -O3 -Wall -c foo.c
foo.c: In function ?f?:
foo.c:6: warning: array subscript is above array bounds
foo.c:6: warning: array subscript is above array bounds

And the results  of executing example stap script 
are like above.


-- 


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]