llvm-project/compiler-rt/lib
Reid Kleckner 03d703bb62 [asan] Export new and delete operators on Windows
This is necessary to support the dynamic CRT (/MD) with VS2015. In
VS2015, these symbols are no longer imported from a DLL, they provided
statically by msvcrt.lib. This means our approach of hotpatching the DLL
no longer works.

By exporting the symbols, we end up relying on the same mechanism that
we use to intercept symbols in the static CRT (/MT) case. The ASan
runtime always needs to appear first on the link line, and the linker
searches for symbol definitions from left to right. This means we can
stop hotpatching operator new and delete in the CRT, which is nice.

I think that the only reason we weren't exporting the symbols already is
because MSVC doesn't allow you to do it directly with
__declspec(dllexport). Instead, we can use
`#pragma comment(linker, "/export:foo")`, which is most of what the
attribute does under the hood. It does mean we have to write down the
mangled names of the operators, but that's not too bad.

llvm-svn: 264190
2016-03-23 20:45:52 +00:00
..
BlocksRuntime Move tests for BlocksRuntime and builtins to corresponding directories under test/ 2014-02-14 09:47:31 +00:00
asan [asan] Export new and delete operators on Windows 2016-03-23 20:45:52 +00:00
builtins builtins: make __clear_cache work on Linux-ARM 2016-03-18 21:06:06 +00:00
cfi [sancov] common flags initialization. 2016-03-18 19:28:07 +00:00
dfsan [sancov] common flags initialization. 2016-03-18 19:28:07 +00:00
interception [asan] Add ucrtbase.dll to the list of DLLs to intercept 2016-03-22 15:46:50 +00:00
lsan [cmake] Address Samsonov's post-commit review of r262723 2016-03-05 10:01:04 +00:00
msan [sancov] common flags initialization. 2016-03-18 19:28:07 +00:00
profile Fix test failure on darwin-i386 2016-03-09 21:45:37 +00:00
safestack [compiler-rt] [safestack] Enable for aarch64 2015-12-11 17:38:38 +00:00
sanitizer_common [sanitizer] Add strchr* to the common interceptors 2016-03-21 21:36:17 +00:00
stats [Sanitizer] Introduce ListOfModules object and use it to replace GetListOfModules(). 2016-02-22 18:52:51 +00:00
tsan Revert "[tsan] Disable randomized address space on linux aarch64." 2016-03-23 11:24:30 +00:00
ubsan [sancov] common flags initialization. 2016-03-18 19:28:07 +00:00
CMakeLists.txt Introduce stats and stats_client libraries. 2016-01-16 00:31:29 +00:00
Makefile.mk Remove autoconf support for building runtime libraries. 2016-01-26 21:31:12 +00:00