[PATCH] D26771: [asan] Create a .ASAN$G(A-Z) section for global registration

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 09:06:40 PST 2016


kcc added a reviewer: vitalybuka.
kcc added a comment.

Vitaly, FYI. 
Reid, could you please also add a test with a DSO?



================
Comment at: lib/asan/asan_globals_win.cc:28
+static void call_on_globals(void (*hook)(__asan_global *, uptr)) {
+  __asan_global *start = (__asan_global *)(&__asan_globals_start + 1);
+  __asan_global *end = (__asan_global *)&__asan_globals_end;
----------------
will this work in the presence of multiple DSOs? 
I.e. if asan rt is on one DSO and the callback comes from the other. 
(Just asking, I don't remember how this is done on Windows)


https://reviews.llvm.org/D26771





More information about the llvm-commits mailing list