[PATCH] D115103: Leak Sanitizer port to Windows

Clemens Wasser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 4 12:11:37 PST 2021


clemenswasser created this revision.
clemenswasser added a project: Sanitizers.
Herald added subscribers: abrachet, phosek, krytarowski, mgorny.
clemenswasser requested review of this revision.
Herald added a project: clang.
Herald added subscribers: Sanitizers, cfe-commits.

This was done by me in a few hours, so don't expect too much ;)

Initial Leak Sanitizer port to Windows.
The main part of the port was to implement `StopTheWorld` for Windows.
Many tests of the lsan test suite seem to run fine (leaks are correctly being reported), however `__lsan_ignore_object` doesn't seem to work.
Some other tests that fail are: new_array_with_dtor_0 and large_allocation_leak.
The test suite for lsan won't run for me:

  $ "LSAN_BASE=use_stacks=0:use_registers=0"
  'LSAN_BASE=use_stacks=0:use_registers=0': command not found

Also I need to figure out, how to get clang to auto link the lsan runtime when specifying `-fsanitize=address` on Windows.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115103

Files:
  clang/lib/Driver/ToolChains/MSVC.cpp
  compiler-rt/cmake/config-ix.cmake
  compiler-rt/lib/lsan/CMakeLists.txt
  compiler-rt/lib/lsan/lsan.h
  compiler-rt/lib/lsan/lsan_allocator.cpp
  compiler-rt/lib/lsan/lsan_common.cpp
  compiler-rt/lib/lsan/lsan_common.h
  compiler-rt/lib/lsan/lsan_common_win.cpp
  compiler-rt/lib/lsan/lsan_interceptors.cpp
  compiler-rt/lib/lsan/lsan_win.cpp
  compiler-rt/lib/lsan/lsan_win.h
  compiler-rt/lib/sanitizer_common/CMakeLists.txt
  compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_win.cpp
  compiler-rt/test/lsan/lit.common.cfg.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115103.391851.patch
Type: text/x-patch
Size: 18209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211204/9b4af9d4/attachment-0001.bin>


More information about the cfe-commits mailing list