diff options
Diffstat (limited to 'lib/asan/tests/stack-overflow.cc')
-rw-r--r-- | lib/asan/tests/stack-overflow.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/asan/tests/stack-overflow.cc b/lib/asan/tests/stack-overflow.cc new file mode 100644 index 000000000000..dd86aa32514a --- /dev/null +++ b/lib/asan/tests/stack-overflow.cc @@ -0,0 +1,7 @@ +#include <string.h> +int main(int argc, char **argv) { + char x[10]; + memset(x, 0, 10); + int res = x[argc * 10]; // BOOOM + return res; +} |