Displaying 1 result from an estimated 1 matches for "example32".
Did you mean:
example2
2016 Jun 17
2
Attempt to modify memory sanitizer for support of X86
...io.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int *a = (int *)malloc(10*sizeof(10));
a[5] = 0;
if (a[argc])
printf("xx\n");
return 0;
}
which I compiled with the command
clang -fsanitize=memory -m32 -fPIE -pie -fno-omit-frame-pointer -g -Wl,-Map,example32.map example.c -oexample32.out
I get now a segmentation fault during the execution:
(gdb) r
Starting program: /home/pusl/code/example32.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SI...