ABR: reading memory beyond array bounds at address 0x50030 (4 bytes)
block at 0x50008 (40 bytes long)
main() + 0x188
[discover_example:0x30614]
(line ~36) in "discover_example.c"
33: a = f(N);
34: printf("First %d Fibnoacci numbers:\n", N);
35: for(i = 0; i <= N; i++) {
36: printf("%d\n", a[i]);
37: }
38:
39: /* Print first M=1 Fibonacci numbers */
_start() + 0x5c [discover_example:0x105a8]
was allocated at:
malloc() + 0x168 [/export/home/opt/SUNW0scgfss/4.0.4/prod/lib/postopt/libdiscover.so:0xea54]
f() + 0x1c
[discover_example:0x3001c]
(line ~9) in "discover_example.c"
6:
7: int *f(int n)
8: {
9: int *a = (int *)malloc( n * sizeof(int) );
10: int i, j, k;
11:
12: a[0] = 0;
main() + 0x1c
[discover_example:0x304a8]
(line ~33) in "discover_example.c"
30: int i;
31:
32: /* Print first N=10 Fibonacci numbers */
33: a = f(N);
34: printf("First %d Fibnoacci numbers:\n", N);
35: for(i = 0; i <= N; i++) {
36: printf("%d\n", a[i]);
_start() + 0x5c [discover_example:0x105a8]
UAW: writing to unallocated memory at address 0x50074 (4 bytes)
f() + 0xa4
[discover_example:0x300a4]
(line ~13) in "discover_example.c"
10: int i, j, k;
11:
12: a[0] = 0;
13: a[1] = 1;
14: i = 2;
15: j = 0;
16: k = 1;
main() + 0x90
[discover_example:0x3051c]
(line ~40) in "discover_example.c"
37: }
38:
39: /* Print first M=1 Fibonacci numbers */
40: a = f(M);
41: printf("First %d Fibnoacci numbers:\n", M);
42: for(i = 0; i <= M; i++) {
43: printf("%d\n", a[i]);
_start() + 0x5c [discover_example:0x105a8]
UAR: reading from unallocated memory at address 0x50074 (4 bytes)
main() + 0x14c
[discover_example:0x305d8]
(line ~43) in "discover_example.c"
40: a = f(M);
41: printf("First %d Fibnoacci numbers:\n", M);
42: for(i = 0; i <= M; i++) {
43: printf("%d\n", a[i]);
44: }
45:
46: return 0;
_start() + 0x5c [discover_example:0x105a8]
2 blocks left allocated on heap with total size of 44 bytes
block at 0x50008 (40 bytes long)
was allocated at:
malloc() + 0x168 [/export/home/opt/SUNW0scgfss/4.0.4/prod/lib/postopt/libdiscover.so:0xea54]
f() + 0x1c
[discover_example:0x3001c]
(line ~9) in "discover_example.c"
6:
7: int *f(int n)
8: {
9: int *a = (int *)malloc( n * sizeof(int) );
10: int i, j, k;
11:
12: a[0] = 0;
main() + 0x1c
[discover_example:0x304a8]
(line ~33) in "discover_example.c"
30: int i;
31:
32: /* Print first N=10 Fibonacci numbers */
33: a = f(N);
34: printf("First %d Fibnoacci numbers:\n", N);
35: for(i = 0; i <= N; i++) {
36: printf("%d\n", a[i]);
_start() + 0x5c [discover_example:0x105a8]
block at 0x50070 (4 bytes long)
was allocated at:
malloc() + 0x168 [/export/home/opt/SUNW0scgfss/4.0.4/prod/lib/postopt/libdiscover.so:0xea54]
f() + 0x1c
[discover_example:0x3001c]
(line ~9) in "discover_example.c"
6:
7: int *f(int n)
8: {
9: int *a = (int *)malloc( n * sizeof(int) );
10: int i, j, k;
11:
12: a[0] = 0;
main() + 0x90
[discover_example:0x3051c]
(line ~40) in "discover_example.c"
37: }
38:
39: /* Print first M=1 Fibonacci numbers */
40: a = f(M);
41: printf("First %d Fibnoacci numbers:\n", M);
42: for(i = 0; i <= M; i++) {
43: printf("%d\n", a[i]);
_start() + 0x5c [discover_example:0x105a8]