Skip to content

Commit 72a514f

Browse files
authored
[NFC][asan] Report DynInitUnPoison (llvm#101586)
1 parent bbdb1e4 commit 72a514f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler-rt/lib/asan/asan_globals.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ void __asan_after_dynamic_init() {
477477
return;
478478
CHECK(AsanInited());
479479
Lock lock(&mu_for_globals);
480-
// FIXME: Optionally report that we're unpoisoning globals from a module.
480+
if (flags()->report_globals >= 3)
481+
Printf("DynInitUnpoison\n");
481482
for (const DynInitGlobal &dyn_g : dynamic_init_globals) {
482483
const Global *g = &dyn_g.g;
483484
if (!dyn_g.initialized) {

compiler-rt/test/asan/TestCases/initialization-nobug.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ int getStructWithDtorValue() { return struct_with_dtor.value; }
4444
int main() { return 0; }
4545

4646
// CHECK: DynInitPoison module: {{.*}}initialization-nobug.cpp
47+
// CHECK: DynInitUnpoison
4748
// CHECK: DynInitPoison module: {{.*}}initialization-nobug-extra.cpp
49+
// CHECK: DynInitUnpoison

0 commit comments

Comments
 (0)