[compiler-rt] r314415 - [asan] Unpoison global metadata on dlclose.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 06:38:58 PDT 2017
Author: d0k
Date: Thu Sep 28 06:38:58 2017
New Revision: 314415
URL: http://llvm.org/viewvc/llvm-project?rev=314415&view=rev
Log:
[asan] Unpoison global metadata on dlclose.
dlclose itself might touch it, so better return it to the state it was
before. I don't know how to create a test for this as it would require
chaning dlclose itself.
Modified:
compiler-rt/trunk/lib/asan/asan_globals.cc
Modified: compiler-rt/trunk/lib/asan/asan_globals.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_globals.cc?rev=314415&r1=314414&r2=314415&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_globals.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_globals.cc Thu Sep 28 06:38:58 2017
@@ -403,6 +403,9 @@ void __asan_unregister_globals(__asan_gl
}
UnregisterGlobal(&globals[i]);
}
+
+ // Unpoison the metadata.
+ PoisonShadow(reinterpret_cast<uptr>(globals), n * sizeof(__asan_global), 0);
}
// This method runs immediately prior to dynamic initialization in each TU,
More information about the llvm-commits
mailing list