<div>bcc: cfe-commits</div><div>[asan-rt patches usually go to llvm-commits]</div><div><br></div><div>+  PoisonShadow(g->beg, g->size_with_redzone, -1);                                                                                                                                                  </div>
<div>-1 should be a constant similar to kAsanStackLeftRedzoneMagic, ideally not 0xff and different from all other constants. </div><div>Also, please update switch in  __asan_report_error</div><div><br></div><div><br></div>
<div><div>+  for (ListOfGlobals *l = list_of_globals; l; l = l->next) {                                                                                                                                       </div><div>+    //Poison only globals not defined in this TU                                                                                                                                                   </div>
<div>+    if (!IsGlobalInList(globals, n, l->g)){                         </div></div><div><br></div><div>This is N^2, isn't it? </div><div>Even once we get rid of N^2, this will still be not very efficient (due to linked list traversal). </div>
<div>I can live with this for now, but this will need to be fixed before we enable the phase. </div><div><br></div><div>BTW, asan-rt uses cpplint to check the code. (try "make -f Makefile.old lint" in asan dir)</div>
<div><br></div><div>Thanks! </div><div>--kcc</div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Jun 30, 2012 at 1:35 AM, Reid Watson <span dir="ltr"><<a href="mailto:reidw@google.com" target="_blank">reidw@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I've attached a patch to add basic support for detecting problems with<br>
initialization order in C++ to AddressSanitizer.<br>
This patch relies on changes to the instrumentation pass, and I've<br>
sent a patch for this to LLVM.<br>
This is definitely a first draft, and it leans toward false positives<br>
(function local statics, in particular), but it does detect the most<br>
basic cases of the "static initialization order fiasco".<br>
For now, I'd like to get a working baseline/infrastructure committed,<br>
in order to avoid any monster commits.<br>
<br>
<br>
All the best,<br>
Reid<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>