[PATCH] Make init-order checker accept access to already initialized globals
Kostya Serebryany
kcc at google.com
Thu Apr 18 21:34:15 PDT 2013
LGTM
That's a bit pity. This way we will only detect actual bugs in the given link order, not all potential bugs. Right?
I think it's ok to go (with lexical nits), but please keep the bug open -- we should find a better way eventually.
================
Comment at: lib/asan/asan_globals.cc:170
@@ -162,1 +169,3 @@
+ continue;
+ else if (g->module_name != module_name)
PoisonShadowForGlobal(g, kAsanInitializationOrderMagic);
----------------
remove else
Or, better rewrite the loop body to look like
if(strict_init_order) {
} else {
}
(imho, more readable)
http://llvm-reviews.chandlerc.com/D679
More information about the llvm-commits
mailing list