[PATCH] D115103: Leak Sanitizer port to Windows

Clemens Wasser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 20 12:30:09 PST 2023


clemenswasser added a comment.

@aganea You can find my current changes on my D115103 branch <https://github.com/clemenswasser/llvm-project/tree/D115103>. I am using the currently failing `use_stacks.cpp` test.
Something like this should make debugging of this issue possible:

  > cd llvm-project
  > cmake -G Ninja -B build -D CMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_PROJECTS=clang;compiler-rt
  > cmake --build build -t check-lsan
  > cp build\projects\compiler-rt\test\lsan\X86_64LsanConfig\TestCases\Output\use_stacks.cpp.tmp build\projects\compiler-rt\test\lsan\X86_64LsanConfig\TestCases\Output\use_stacks.cpp.exe
  > devenv /debugexe build\projects\compiler-rt\test\lsan\X86_64LsanConfig\TestCases\Output\use_stacks.cpp.exe

You should see that the `LSAN_MAYBE_INTERCEPT_CREATE_THREAD` in `__lsan::InitializeInterceptors` fails because of the wrong instruction read of the `CreateThread` function address in `GetInstructionSize` as described above.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115103/new/

https://reviews.llvm.org/D115103



More information about the cfe-commits mailing list