[PATCH] D15644: [asan] Use private aliases for global variables (compiler-rt part).
Maxim Ostapenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 13:33:52 PST 2016
m.ostapenko added inline comments.
================
Comment at: lib/asan/asan_globals.cc:143
@@ +142,3 @@
+ u8 *odr_indicator = reinterpret_cast<u8 *>(g->odr_indicator);
+ if (!*odr_indicator) return;
+ // If *odr_indicator is not zero, some module have already registered
----------------
ygribov wrote:
> I think you forgot to set *odr_indicator to 1 here? Or rather to some descriptive enum value e.g. DEFINED. This would also simplify below description.
Yeah, thanks. Just remembered about this 5 minutes ago ☺.
================
Comment at: lib/asan/asan_globals.cc:176
@@ +175,3 @@
+// case we may poison same symbol mutiple times, that can help us to
+// cheeply detect ODR violation: if we try poison already poisoned global,
+// we have ODR violation error.
----------------
ygribov wrote:
> Some spelling suggestions: s/cheeply/cheaply/, s/try poison/try to poison an/
Ouch, thanks.
http://reviews.llvm.org/D15644
More information about the llvm-commits
mailing list