Commit Graph

1 Commits

Author SHA1 Message Date
Reid Kleckner e1e344ed05 [asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initialization
Summary:
ASan needs to initialize before ucrtbase.dll so that it can intercept
all of its heap allocations. New versions of dbghelp.dll depend on
ucrtbase.dll, which means both of those DLLs will initialize before the
dynamic ASan runtime. By lazily loading dbghelp.dll with LoadLibrary, we
avoid the issue.

Eventually, I would like to remove our dbghelp.dll dependency in favor
of always using llvm-symbolizer.exe, but this seems like an acceptable
interim solution.

Fixes PR30903

Reviewers: etienneb

Subscribers: kubabrecka, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D26473

llvm-svn: 286848
2016-11-14 17:37:50 +00:00