Displaying 1 result from an estimated 1 matches for "__llvm__unsafe_stack_ptr".
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...Type::get(Int8Ty->getPointerTo(), AddressSpace));
+ } else {
+ // The unsafe stack pointer is stored in a global variable with a magic name
+ // FIXME: make the name start with "llvm."
+ UnsafeStackPtr = dyn_cast_or_null<GlobalVariable>(
+ M.getNamedValue("__llvm__unsafe_stack_ptr"));
+
+ if (!UnsafeStackPtr) {
+ // The global variable is not defined yet, define it ourselves
+ UnsafeStackPtr = new GlobalVariable(
+ /*Module=*/ M, /*Type=*/ Int8Ty->getPointerTo(),
+ /*isConstant=*/ false, /*Linkage=*/ GlobalValue::ExternalLinka...