@@ -534,7 +534,7 @@ void AddressSanitizer::createInitializerPoisonCalls(Module &M,
534
534
535
535
bool AddressSanitizer::ShouldInstrumentGlobal (GlobalVariable *G) {
536
536
Type *Ty = cast<PointerType>(G->getType ())->getElementType ();
537
- DEBUG (dbgs () << " GLOBAL: " << *G);
537
+ DEBUG (dbgs () << " GLOBAL: " << *G << " \n " );
538
538
539
539
if (BL->isIn (*G)) return false ;
540
540
if (!Ty->isSized ()) return false ;
@@ -682,7 +682,7 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) {
682
682
FirstDynamic = LastDynamic;
683
683
}
684
684
685
- DEBUG (dbgs () << " NEW GLOBAL:\n " << *NewGlobal);
685
+ DEBUG (dbgs () << " NEW GLOBAL: " << *NewGlobal << " \n " );
686
686
}
687
687
688
688
ArrayType *ArrayOfGlobalStructTy = ArrayType::get (GlobalStructTy, n);
@@ -851,6 +851,7 @@ bool AddressSanitizer::maybeInsertAsanInitAtFunctionEntry(Function &F) {
851
851
bool AddressSanitizer::runOnFunction (Function &F) {
852
852
if (BL->isIn (F)) return false ;
853
853
if (&F == AsanCtorFunction) return false ;
854
+ DEBUG (dbgs () << " ASAN instrumenting:\n " << F << " \n " );
854
855
855
856
// If needed, insert __asan_init before checking for AddressSafety attr.
856
857
maybeInsertAsanInitAtFunctionEntry (F);
@@ -914,8 +915,6 @@ bool AddressSanitizer::runOnFunction(Function &F) {
914
915
NumInstrumented++;
915
916
}
916
917
917
- DEBUG (dbgs () << F);
918
-
919
918
bool ChangedStack = poisonStackInFunction (F);
920
919
921
920
// We must unpoison the stack before every NoReturn call (throw, _exit, etc).
@@ -925,6 +924,7 @@ bool AddressSanitizer::runOnFunction(Function &F) {
925
924
IRBuilder<> IRB (CI);
926
925
IRB.CreateCall (AsanHandleNoReturnFunc);
927
926
}
927
+ DEBUG (dbgs () << " ASAN done instrumenting:\n " << F << " \n " );
928
928
929
929
return NumInstrumented > 0 || ChangedStack || !NoReturnCalls.empty ();
930
930
}
0 commit comments