Displaying 2 results from an estimated 2 matches for "stackportector".
Did you mean:
stack_protector
2011 Jul 26
0
[LLVMdev] How to get the return address on the stack on LLVM
On 7/26/11 5:37 PM, Xueying ZHANG wrote:
> Hi John,
>
> Thanks for your reply!
I'm CC'ing this to the list in case anyone knows why you're seeing this
behavior.
>
> Now, I know the different between llvm.returnaddress(0) and
> llvm.returnaddress(1). I modify the StackPortector.cpp and I just want
> to get value of the return address stored on the stack.
>
> But when I call llvm.returnaddress(0) twice. For the first time, it
> goes to the correct address which storing return address.
Fascinating. The first thing to do is to see if one of the LLVM IR
opti...
2011 Jul 26
4
[LLVMdev] How to get the return address on the stack on LLVM
Hi all,
I want to implement the Xor random canary, so I have to get the return
address in the prologue and epilogue of the function.
In the prologue of the function, before I insert into the canary on
the stack, I can get the return address by:
ConstantInt* ci =
llvm::ConstantInt::get(Type::getInt32Ty(RI->getContext()), 0);
Value* Args1[] = {ci};
CallInst* callInst =