[PATCH] Make init-order checker accept access to already initialized globals

Alexey Samsonov samsonov at google.com
Fri Apr 19 01:38:22 PDT 2013


  r179843, thanks!

  Ok, let's continue discussion in the upstream bug.


================
Comment at: lib/asan/asan_globals.cc:170
@@ -162,1 +169,3 @@
+      continue;
+    else if (g->module_name != module_name)
       PoisonShadowForGlobal(g, kAsanInitializationOrderMagic);
----------------
Kostya Serebryany wrote:
> remove else
> 
> Or, better rewrite the loop body to look like 
> if(strict_init_order) {
> } else {
> }
> (imho, more readable)
Done (the first way)


http://llvm-reviews.chandlerc.com/D679



More information about the llvm-commits mailing list