[llvm-branch-commits] [NFC][asan] Report DynInitUnPoison (PR #101586)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 1 16:50:47 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Vitaly Buka (vitalybuka)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/101586.diff
2 Files Affected:
- (modified) compiler-rt/lib/asan/asan_globals.cpp (+2-1)
- (modified) compiler-rt/test/asan/TestCases/initialization-nobug.cpp (+2)
``````````diff
diff --git a/compiler-rt/lib/asan/asan_globals.cpp b/compiler-rt/lib/asan/asan_globals.cpp
index 90481467d5eb8..4849650214773 100644
--- a/compiler-rt/lib/asan/asan_globals.cpp
+++ b/compiler-rt/lib/asan/asan_globals.cpp
@@ -467,7 +467,8 @@ void __asan_after_dynamic_init() {
return;
CHECK(AsanInited());
Lock lock(&mu_for_globals);
- // FIXME: Optionally report that we're unpoisoning globals from a module.
+ if (flags()->report_globals >= 3)
+ Printf("DynInitUnpoison\n");
for (const DynInitGlobal &dyn_g : dynamic_init_globals) {
const Global *g = &dyn_g.g;
if (!dyn_g.initialized) {
diff --git a/compiler-rt/test/asan/TestCases/initialization-nobug.cpp b/compiler-rt/test/asan/TestCases/initialization-nobug.cpp
index 0b8fca3dee8b3..6cfef022ae57e 100644
--- a/compiler-rt/test/asan/TestCases/initialization-nobug.cpp
+++ b/compiler-rt/test/asan/TestCases/initialization-nobug.cpp
@@ -46,4 +46,6 @@ int main() { return 0; }
// CHECK: DynInitPoison module: {{.*}}initialization-nobug.cpp
+// CHECK: DynInitUnpoison
// CHECK: DynInitPoison module: {{.*}}initialization-nobug-extra.cpp
+// CHECK: DynInitUnpoison
``````````
</details>
https://github.com/llvm/llvm-project/pull/101586
More information about the llvm-branch-commits
mailing list