[PATCH] D26473: [asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initialization

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 16:09:23 PST 2016


aaron.ballman accepted this revision.
aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Modulo @kubabrecka 's comments, LGTM



================
Comment at: lib/sanitizer_common/sanitizer_dbghelp.h:28
+
+extern decltype(::StackWalk64) *StackWalk64;
+extern decltype(::SymCleanup) *SymCleanup;
----------------
I love this pattern. We should clean up some of LLVM's header similarly.


================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_win.cc:67
+#define DBGHELP_IMPORT(name) \
+  name = reinterpret_cast<decltype(::name) *>(GetProcAddress(dbghelp, #name));
+  DBGHELP_IMPORT(StackWalk64);
----------------
Should we also assert that the returned pointer is not null?


https://reviews.llvm.org/D26473





More information about the llvm-commits mailing list