[all-commits] [llvm/llvm-project] 53a81d: Reland [asan][windows] Eliminate the static asan r...

Charlie Barto via All-commits all-commits at lists.llvm.org
Mon Sep 9 13:41:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53a81d4d26f0409de8a0655d7af90f2bea222a12
      https://github.com/llvm/llvm-project/commit/53a81d4d26f0409de8a0655d7af90f2bea222a12
  Author: Charlie Barto <chbarto at microsoft.com>
  Date:   2024-09-09 (Mon, 09 Sep 2024)

  Changed paths:
    M clang/lib/Driver/SanitizerArgs.cpp
    M clang/lib/Driver/ToolChains/MSVC.cpp
    M clang/test/Driver/cl-link.c
    M compiler-rt/CMakeLists.txt
    M compiler-rt/lib/asan/CMakeLists.txt
    M compiler-rt/lib/asan/asan_flags.cpp
    M compiler-rt/lib/asan/asan_globals_win.cpp
    M compiler-rt/lib/asan/asan_malloc_win.cpp
    A compiler-rt/lib/asan/asan_malloc_win_thunk.cpp
    A compiler-rt/lib/asan/asan_win_common_runtime_thunk.cpp
    A compiler-rt/lib/asan/asan_win_common_runtime_thunk.h
    R compiler-rt/lib/asan/asan_win_dll_thunk.cpp
    M compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cpp
    A compiler-rt/lib/asan/asan_win_static_runtime_thunk.cpp
    R compiler-rt/lib/asan/asan_win_weak_interception.cpp
    M compiler-rt/lib/asan/tests/CMakeLists.txt
    M compiler-rt/lib/interception/CMakeLists.txt
    M compiler-rt/lib/profile/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
    R compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dll_thunk.cpp
    R compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cpp
    A compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_runtime_thunk.cpp
    R compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_weak_interception.cpp
    R compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.cpp
    R compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.h
    R compiler-rt/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cpp
    A compiler-rt/lib/sanitizer_common/sanitizer_win_immortalize.h
    A compiler-rt/lib/sanitizer_common/sanitizer_win_interception.cpp
    A compiler-rt/lib/sanitizer_common/sanitizer_win_interception.h
    A compiler-rt/lib/sanitizer_common/sanitizer_win_thunk_interception.cpp
    A compiler-rt/lib/sanitizer_common/sanitizer_win_thunk_interception.h
    R compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.cpp
    R compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.h
    M compiler-rt/lib/ubsan/CMakeLists.txt
    R compiler-rt/lib/ubsan/ubsan_win_dll_thunk.cpp
    R compiler-rt/lib/ubsan/ubsan_win_dynamic_runtime_thunk.cpp
    A compiler-rt/lib/ubsan/ubsan_win_runtime_thunk.cpp
    R compiler-rt/lib/ubsan/ubsan_win_weak_interception.cpp
    M compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cpp
    M compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cpp
    M compiler-rt/test/asan/TestCases/Windows/double_free.cpp
    M compiler-rt/test/asan/TestCases/Windows/free_hook_realloc.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/msvc/dll_and_lib.cpp
    M compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp
    M compiler-rt/test/asan/TestCases/Windows/unsymbolized.cpp
    M compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp
    M compiler-rt/test/asan/TestCases/debug_double_free.cpp
    M compiler-rt/test/asan/TestCases/debug_report.cpp
    M compiler-rt/test/asan/TestCases/default_options.cpp
    M compiler-rt/test/asan/TestCases/on_error_callback.cpp
    M compiler-rt/test/asan/TestCases/report_error_summary.cpp
    M compiler-rt/test/asan/lit.cfg.py

  Log Message:
  -----------
  Reland [asan][windows] Eliminate the static asan runtime on windows (#107899)

This reapplies 8fa66c6ca7272268747835a0e86805307b62399c ([asan][windows]
Eliminate the static asan runtime on windows) for a second time.

That PR bounced off the tests because it caused failures in the other
sanitizer runtimes, these have been fixed by only building interception,
sanitizer_common, and asan with /MD, and continuing to build the rest of
the runtimes with /MT. This does mean that any usage of the static
ubsan/fuzzer/etc runtimes will mean you're mixing different runtime
library linkages in the same app, the interception, sanitizer_common,
and asan runtimes are designed for this, however it does result in some
linker warnings.

Additionally, it turns out when building in release-mode with
LLVM_ENABLE_PDBs the build system forced /OPT:ICF. This totally breaks
asan's "new" method of doing "weak" functions on windows, and so
/OPT:NOICF was explicitly added to asan's link flags.

---------

Co-authored-by: Amy Wishnousky <amyw at microsoft.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list