[llvm-dev] Is shadow call stack in llvm 7 ok?
PenYiWang via llvm-dev
llvm-dev at lists.llvm.org
Thu Nov 22 00:59:45 PST 2018
Hi
I try the shadow call stack in llvm.
clang -fsanitize=shadow-call-stack ./test.c
test.c
#include<stdio.h>
void A(){
printf("A\n");
}
int main(){
A();
return 0;
}
And then produe weird code
0000000000400570 <main>:
400570: 4c 8b 14 24 mov r10,QWORD PTR [rsp]
400574: 4d 31 db xor r11,r11
400577: 65 49 83 03 08 add QWORD PTR gs:[r11],0x8
40057c: 65 4d 8b 1b mov r11,QWORD PTR gs:[r11]
400580: 65 4d 89 13 mov QWORD PTR gs:[r11],r10
at 0x400577 the program crashes
because r11 is 0 after 0x400574 .
I wonder that shadow call stack in llvm 7 is ok now?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181122/1156bea6/attachment.html>
More information about the llvm-dev
mailing list