Lines Matching defs:FunctionStackPoisoner
550 struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> { struct
551 Function &F;
552 AddressSanitizer &ASan;
553 DIBuilder DIB;
554 LLVMContext *C;
555 Type *IntptrTy;
556 Type *IntptrPtrTy;
557 ShadowMapping Mapping;
559 SmallVector<AllocaInst *, 16> AllocaVec;
560 SmallSetVector<AllocaInst *, 16> NonInstrumentedStaticAllocaVec;
561 SmallVector<Instruction *, 8> RetVec;
562 unsigned StackAlignment;
564 Function *AsanStackMallocFunc[kMaxAsanStackMallocSizeClass + 1],
565 *AsanStackFreeFunc[kMaxAsanStackMallocSizeClass + 1];
566 Function *AsanPoisonStackMemoryFunc, *AsanUnpoisonStackMemoryFunc;
567 Function *AsanAllocaPoisonFunc, *AsanAllocasUnpoisonFunc;
570 struct AllocaPoisonCall {
576 SmallVector<AllocaPoisonCall, 8> AllocaPoisonCallVec;
578 SmallVector<AllocaInst *, 1> DynamicAllocaVec;
579 SmallVector<IntrinsicInst *, 1> StackRestoreVec;
580 AllocaInst *DynamicAllocaLayout = nullptr;
581 IntrinsicInst *LocalEscapeCall = nullptr;
584 typedef DenseMap<Value *, AllocaInst *> AllocaForValueMapTy;
585 AllocaForValueMapTy AllocaForValue;
587 bool HasNonEmptyInlineAsm = false;
588 bool HasReturnsTwiceCall = false;
589 std::unique_ptr<CallInst> EmptyInlineAsm;
591 FunctionStackPoisoner(Function &F, AddressSanitizer &ASan) in FunctionStackPoisoner() argument
602 bool runOnFunction() { in runOnFunction()
628 void visitReturnInst(ReturnInst &RI) { RetVec.push_back(&RI); } in visitReturnInst()
630 void unpoisonDynamicAllocasBeforeInst(Instruction *InstBefore, in unpoisonDynamicAllocasBeforeInst()
654 void unpoisonDynamicAllocas() { in unpoisonDynamicAllocas()
676 void visitAllocaInst(AllocaInst &AI) { in visitAllocaInst()
691 void visitIntrinsicInst(IntrinsicInst &II) { in visitIntrinsicInst()
716 void visitCallSite(CallSite CS) { in visitCallSite()
728 bool doesDominateAllExits(const Instruction *I) const { in doesDominateAllExits()