Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
d8c12f178d9d03b934ce10d6fcb45c27503889dc
/
.
/
exp-sgcheck
/
tests
/
hp_bounds.c
blob: e456cabe8ee2ba0460b610e377164216f1bed275 [
file
] [
log
] [
blame
]
#include
<stdlib.h>
int
main
(
void
)
{
int
y __attribute__
((
unused
));
int
*
x
=
malloc
(
sizeof
(
int
)
*
100
);
y
=
x
[
95
];
// ok
y
=
x
[
100
];
// overrun
y
=
x
[-
1
];
// underrun
return
0
;
}