[PATCH] D115103: Leak Sanitizer port to Windows

2023-02-20 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @aganea You can find my current changes on my D115103 branch . I am using the currently failing `use_stacks.cpp` test. Something like this should make debugging of this issue possible: > cd

[PATCH] D115103: Leak Sanitizer port to Windows

2023-02-18 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. I am currently unable to progress as all of my interceptors are not working. The interceptors are failing, because the `GetInstructionSize` function fails. For example, the `CreateThread` Win32 function starts on my Windows 11 installation with `4c 8b dc mov

[PATCH] D115103: Leak Sanitizer port to Windows

2023-02-01 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. Wow, this fixed a lot of tests, down to only 17 lsan standalone tests failing :) (26 already passing) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 ___ cfe-commits

[PATCH] D115103: Leak Sanitizer port to Windows

2023-02-01 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @aganea Thank you very much! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115103: Leak Sanitizer port to Windows

2023-02-01 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @vitalybuka There seems to be a bug in MSVCs bit-field implementation, which causes the `disable.c` test to fail. This reproducer (assert) passes with gcc and fails with MSVC (`m.tag` is `0x`): cpp #include #include enum ChunkTag {

[PATCH] D115103: Leak Sanitizer port to Windows

2022-12-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 481042. clemenswasser added a comment. @vitalybuka I've been working on this on-off for the past months and have gotten the tests in the following state: Unsupported: 41 Passed : 19 Failed : 48 There is still the bug with the tracer

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-23 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 424702. clemenswasser added a comment. I have now split the lsan TestCases chages into https://reviews.llvm.org/D124322 and managed to get the lsan+asan TestCases nearly to work. The current problem is, that during the start of the `RunThread` in

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-10 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 421796. clemenswasser added a comment. I always forget to change the line endings, sorry :( CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-10 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 421795. clemenswasser added a comment. Since I am currently unable to intercept the ExitProcess/TerminateProcess in the ucrt (`exit_or_terminate_process` in `Windows Kits\10\Source\10.0.22000.0\ucrt\startup\exit.cpp:143`) I inserted a call to `Die` in

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-10 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 421791. clemenswasser added a comment. The CI seems to fail because of the parent revision? Retry CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-10 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 421790. clemenswasser added a comment. I was wrong, the Problem was, that I didn't change the exit code, when a leak gets detected. I now intercept ExitProcess and change the exit code in there, with this there are already 12 Tests passing on Windows.

[PATCH] D115103: Leak Sanitizer port to Windows

2022-04-09 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 421758. clemenswasser added a comment. Hi, today I found some more time to play/progress with this patch. I'm generally optimistic that most of the basic lsan stuff should already be working on Windows. However without some help of you, I'm unable to

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-13 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 399689. clemenswasser edited the summary of this revision. clemenswasser added a comment. Updated the Tests. The Problem with Lsan+Asan still exists. I have just disabled them for now. I hope anyone can help me with getting the tests to run correctly?

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. All the lsan tests, when run in lsan+asan mode, Deadlock in `StopTheWord` when creating the tracer thread... F21505206: image.png -> `check-lsan` gets stuck, due to all the deadlocking tests :( Could it be caused by asan

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @aganea Thanks for your help. I already did everything you wrote (I am however using the coreutils provided by Git). `check-asan` works on my new computer. I still don't know why it didn't work on my older one... I will try to get the lsan tests working (and

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-24 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @vitalybuka No `check-asan` **doesn't work** for me. It just hangs forever and does absolutely nothing. No output, nothing showing up in Task Manager with high CPU usage or anything. However `check-clang` **does work**. Is there some documentation on running

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-23 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @vitalybuka I have now removed all `LSAN_BASE` occurrences. However the invocations of the compiled test executables don't seem to work either. This doesn't work: `// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-22 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. The problem is, that `LSAN_BASE` is not always `use_stacks=0:use_registers=0`. Also there are many test cases, where `LSAN_BASE` gets used multiple times. Removing it would result in bad repetition. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-22 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added a comment. @vitalybuka could you or someone else help me get the lsan tests running on Windows? For example lets look at `compiler-rt\test\lsan\TestCases\leak_check_at_exit.cpp` (and basically all other tests, this serves as an easy example) I imagine that the following

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-17 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 395219. clemenswasser added a comment. Simplify Architecture checks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp compiler-rt/cmake/config-ix.cmake

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-12 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 393750. clemenswasser added a comment. Herald added subscribers: luke957, s.egerton, simoncook. Implement ProcessGlobalRegions Fix Interceptors for Windows CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 392446. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp compiler-rt/cmake/config-ix.cmake compiler-rt/lib/lsan/CMakeLists.txt

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 392444. clemenswasser added a comment. Split this patch up into multiple smaller ones: - D115186 - D115204 - D115262 CHANGES SINCE LAST ACTION

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-07 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser added inline comments. Comment at: compiler-rt/lib/lsan/lsan.h:20 +#elif SANITIZER_WINDOWS +# include "lsan_win.h" #endif MyDeveloperDay wrote: > clang-format? Yes, this is caused by clang-format. What should I do about it?

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-06 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 392017. clemenswasser added a comment. Remove wrong interceptors CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp compiler-rt/cmake/config-ix.cmake

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-04 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 391875. clemenswasser added a comment. Use LF line endings CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp compiler-rt/cmake/config-ix.cmake

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-04 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 391873. clemenswasser added a comment. Apply clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp compiler-rt/cmake/config-ix.cmake

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-04 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 391872. clemenswasser added a comment. Move `__lsan_init` call inside of `SANITIZER_WINDOWS` ifdef CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-04 Thread Clemens Wasser via Phabricator via cfe-commits
clemenswasser updated this revision to Diff 391870. clemenswasser added a comment. Changed to core.autocrlf=false CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115103/new/ https://reviews.llvm.org/D115103 Files: clang/lib/Driver/ToolChains/MSVC.cpp

[PATCH] D115103: Leak Sanitizer port to Windows

2021-12-04 Thread Clemens Wasser via Phabricator via cfe-commits
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