Page MenuHomePhabricator

clemenswasser (Clemens Wasser)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 5 2021, 2:49 PM (54 w, 6 d)

Recent Activity

Thu, Jan 13

clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

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?

Thu, Jan 13, 8:56 AM · Restricted Project, Restricted Project

Fri, Jan 7

clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

All the lsan tests, when run in lsan+asan mode, Deadlock in StopTheWord when creating the tracer thread...


-> check-lsan gets stuck, due to all the deadlocking tests :(

Fri, Jan 7, 11:49 AM · Restricted Project, Restricted Project
clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

@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 hopefully passing 😉) on windows soon.

Fri, Jan 7, 9:28 AM · Restricted Project, Restricted Project

Dec 24 2021

clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

@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 check-asan on windows.
I also saw that none of the Windows buildbots check/test anything related to sanitizers. It seems to me that none of the sanitizer stuff gets ever tested on Windows?
Do the test for sanitizers_common/asan/ubsan/etc. even work on Windows?

Dec 24 2021, 8:26 AM · Restricted Project, Restricted Project

Dec 23 2021

clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

@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 --check-prefix=CHECK-do
It generates this error:

[build] $ ":" "RUN: at line 3"
[build] $ "env" "LSAN_OPTIONS=:detect_leaks=1:use_stacks=0:use_registers=0" "not" "E:\git\llvm-project\llvm\build\ninja_debug\projects\compiler-rt\test\lsan\X86_64LsanConfig\TestCases\Output\leak_check_at_exit.cpp.tmp.exe" "foo"
[build] note: command had no output on stdout or stderr
[build] error: command failed with exit status: True
Dec 23 2021, 4:41 AM · Restricted Project, Restricted Project

Dec 22 2021

clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

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.

Dec 22 2021, 3:07 PM · Restricted Project, Restricted Project
clemenswasser added a comment to D115103: Leak Sanitizer port to Windows.

@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 defines a variable called LSAN_BASE :
// RUN: LSAN_BASE="use_stacks=0:use_registers=0"
This doesn't seem to work on Windows.
It gives the following error message:

[build] $ ":" "RUN: at line 2"
[build] $ "LSAN_BASE=use_stacks=0:use_registers=0"
[build] # command stderr:
[build] 'LSAN_BASE=use_stacks=0:use_registers=0': command not found
Dec 22 2021, 2:27 PM · Restricted Project, Restricted Project

Dec 18 2021

clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Fix continue in loop.
Thanks @mstorsjo!

Dec 18 2021, 3:38 AM · Restricted Project
clemenswasser added inline comments to D115204: Port __sanitizer::StopTheWorld to Windows.
Dec 18 2021, 3:35 AM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Fix warning

Dec 18 2021, 3:15 AM · Restricted Project

Dec 17 2021

clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

@mstorsjo probably my only option is to silence the warning locally?

Dec 17 2021, 3:12 PM · Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Simplify Architecture checks

Dec 17 2021, 1:54 PM · Restricted Project, Restricted Project
clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

@clemenswasser Please upload fixed version here and we will try again

Dec 17 2021, 1:35 PM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Fix typo

Dec 17 2021, 1:33 PM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

@mstorsjo I hope this fixes all of your Problems.
For me all sanitizer tests pass on X64 and I386.
Could someone test if the tests also pass on ARM and ARM64?

Dec 17 2021, 1:25 PM · Restricted Project
clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

@mstorsjo sorry for the inconveniences.
I am quite busy right now. I will probably fix this either later today or tomorrow.

Dec 17 2021, 10:19 AM · Restricted Project

Dec 16 2021

clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

Please update the summary, in particular remove:

So I couldn't test if this port actually works
Many other SanitizerUnitTests fail to compile (look in the attached log):

I assume you have resolve the issue in the summary?

Dec 16 2021, 1:27 PM · Restricted Project
clemenswasser updated the summary of D115204: Port __sanitizer::StopTheWorld to Windows.
Dec 16 2021, 1:26 PM · Restricted Project

Dec 14 2021

clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Disable SegvInCallback test on Windows

Dec 14 2021, 1:17 AM · Restricted Project

Dec 12 2021

clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Implement ProcessGlobalRegions
Fix Interceptors for Windows

Dec 12 2021, 6:23 AM · Restricted Project, Restricted Project

Dec 11 2021

clemenswasser requested review of D115584: [lsan] Format CAN_SANITIZE_LEAKS defines.
Dec 11 2021, 12:55 PM · Restricted Project

Dec 10 2021

clemenswasser added inline comments to D115204: Port __sanitizer::StopTheWorld to Windows.
Dec 10 2021, 12:46 AM · Restricted Project

Dec 8 2021

clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Add error handling

Dec 8 2021, 11:52 AM · Restricted Project

Dec 7 2021

clemenswasser added inline comments to D115204: Port __sanitizer::StopTheWorld to Windows.
Dec 7 2021, 11:57 PM · Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.
Dec 7 2021, 9:53 AM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Split this patch up into multiple smaller ones:

Dec 7 2021, 9:50 AM · Restricted Project, Restricted Project
clemenswasser requested review of D115262: Format lsan.h.
Dec 7 2021, 9:24 AM · Restricted Project
clemenswasser added inline comments to D115103: Leak Sanitizer port to Windows.
Dec 7 2021, 7:44 AM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Catch all SEH Exceptions like EXCEPTION_ACCESS_VIOLATION during execution of the callback in StopTheWorld and report them.
This makes the last failing test SegvInCallback pass on Windows 🎉

Dec 7 2021, 6:14 AM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Cleanup of the StopTheWorld implementation.
Fix the following bug:

@vitalybuka I can now run the tests on Windows. However the SuspendThreadsAdvanced test currently fails.
I think it fails because of an issue in my implementation of StopTheWorld.
The problem is that between the call to CreateToolhelp32Snapshot and suspending the Threads, there are still new threads being created, which are then not part of the snapshot.
Because of that, new threads can't being suspended.
Do you (or someone else) have any idea how I could fix this?

Dec 7 2021, 5:43 AM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

clang-format :(

Dec 7 2021, 5:11 AM · Restricted Project
clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

@vitalybuka I can now run the tests on Windows. However the SuspendThreadsAdvanced test currently fails.
I think it fails because of an issue in my implementation of StopTheWorld.
The problem is that between the call to CreateToolhelp32Snapshot and suspending the Threads, there are still new threads being created, which are then not part of the snapshot.
Because of that, new threads can't being suspended.
Do you (or someone else) have any idea how I could fix this?

Dec 7 2021, 5:09 AM · Restricted Project
clemenswasser added a comment to D115204: Port __sanitizer::StopTheWorld to Windows.

Many other SanitizerUnitTests fail to compile (look in the attached log):

Something wrong with the compiler. Can you try different revisions and compare results HEAD, HEAD~10000 etc.?
If it's broken on HEAD then you can file a bug.

Dec 7 2021, 4:39 AM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Hopefully fixes test StopTheWorld.SuspendThreadsAdvanced

Dec 7 2021, 4:24 AM · Restricted Project
clemenswasser added a comment to D115186: Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long.

@vitalybuka No I don't have permissions to push. Could you please do it for me :)

Dec 7 2021, 3:57 AM · Restricted Project
clemenswasser updated the diff for D115204: Port __sanitizer::StopTheWorld to Windows.

Remove ASSERT_NO_THROW from StopTheWorld tests

Dec 7 2021, 3:37 AM · Restricted Project

Dec 6 2021

clemenswasser requested review of D115204: Port __sanitizer::StopTheWorld to Windows.
Dec 6 2021, 4:27 PM · Restricted Project
clemenswasser added a comment to D115186: Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long.

S

I assume you have no committer access?

I don't know. Is that important. Can you please explain what you mean by that? :)

If you asking then you unlikely have one. :) you can't push into git repo.
Someone else will need to commit patches for your, often reviewer.
I will do that.

Dec 6 2021, 3:48 PM · Restricted Project
clemenswasser added a comment to D115186: Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long.

I assume you have no committer access?

Dec 6 2021, 2:45 PM · Restricted Project
clemenswasser requested review of D115186: Change __lsan::kMaxAllowedMallocSize literal types to unsigned long long.
Dec 6 2021, 1:48 PM · Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Remove wrong interceptors

Dec 6 2021, 3:59 AM · Restricted Project, Restricted Project
clemenswasser added reviewers for D115103: Leak Sanitizer port to Windows: kcc, dvyukov.
Dec 6 2021, 2:06 AM · Restricted Project, Restricted Project

Dec 4 2021

clemenswasser updated the summary of D115103: Leak Sanitizer port to Windows.
Dec 4 2021, 2:44 PM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Use LF line endings

Dec 4 2021, 1:11 PM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Apply clang-format

Dec 4 2021, 1:08 PM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Move __lsan_init call inside of SANITIZER_WINDOWS ifdef

Dec 4 2021, 12:56 PM · Restricted Project, Restricted Project
clemenswasser updated the diff for D115103: Leak Sanitizer port to Windows.

Changed to core.autocrlf=false

Dec 4 2021, 12:47 PM · Restricted Project, Restricted Project
clemenswasser updated the summary of D115103: Leak Sanitizer port to Windows.
Dec 4 2021, 12:36 PM · Restricted Project, Restricted Project
clemenswasser requested review of D115103: Leak Sanitizer port to Windows.
Dec 4 2021, 12:11 PM · Restricted Project, Restricted Project

Jan 23 2021

clemenswasser added a comment to D95184: [ASan] Stop blocking child thread progress from parent thread in `pthread_create` interceptor..

You should also change compiler-rt/lib/asan/asan_win.cpp like this:

diff --git a/compiler-rt/lib/asan/asan_win.cpp b/compiler-rt/lib/asan/asan_win.cpp
index 8044ae16ff9b..1577c83cf994 100644
--- a/compiler-rt/lib/asan/asan_win.cpp
+++ b/compiler-rt/lib/asan/asan_win.cpp
@@ -134,7 +134,7 @@ INTERCEPTOR(int, _except_handler4, void *a, void *b, void *c, void *d) {
 static thread_return_t THREAD_CALLING_CONV asan_thread_start(void *arg) {
   AsanThread *t = (AsanThread *)arg;
   SetCurrentThread(t);
-  return t->ThreadStart(GetTid(), /* signal_thread_is_registered */ nullptr);
+  return t->ThreadStart(GetTid());
 }
Jan 23 2021, 6:43 AM · Restricted Project