Skip to content

[Sanitizers] Fix fake_test_gc not working on devices #91284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2024

Conversation

wrotki
Copy link
Contributor

@wrotki wrotki commented May 7, 2024

The way the LIT RUN command is currently constructed ( %run not --crash %t ) causes the test failure on devices - since 'not' is a LLVM built command, not available on devices.

Changing the command to read 'not --crash %run %t' fixes it, as 'not' now executes on the host running the test.

rdar://115914588

The way the LIT RUN command is currently constructed ( %run not --crash %t ) causes the test failure on devices - since 'not' is a LLVM built command, not available on devices.

Changing the command to read 'not --crash %run %t' fixes it, as 'not' now executes on the host running the test.

rdar://115914588
@llvmbot
Copy link
Member

llvmbot commented May 7, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Mariusz Borsa (wrotki)

Changes

The way the LIT RUN command is currently constructed ( %run not --crash %t ) causes the test failure on devices - since 'not' is a LLVM built command, not available on devices.

Changing the command to read 'not --crash %run %t' fixes it, as 'not' now executes on the host running the test.

rdar://115914588


Full diff: https://github.com/llvm/llvm-project/pull/91284.diff

1 Files Affected:

  • (modified) compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp (+1-1)
diff --git a/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp b/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
index 524ca29f2fc577..8c368b9b1b947f 100644
--- a/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -O0 -pthread %s -o %t && %env_asan_opts=use_sigaltstack=0 %run not --crash %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 -pthread %s -o %t && %env_asan_opts=use_sigaltstack=0 not --crash %run %t 2>&1 | FileCheck %s
 
 // Check that fake stack does not discard frames on the main stack, when GC is
 // triggered from high alt stack.

@yln
Copy link
Collaborator

yln commented May 8, 2024

All other tests in compiler-rt/test/asan seem to use not %run, so I think this is fine.

@wrotki
Copy link
Contributor Author

wrotki commented May 8, 2024

The buildkite test failure is n release_shadow_space.c test from dataflow sanitizer, completely unrelated to this change, so I'm going to merge this.

@wrotki wrotki merged commit 63c38ba into llvm:main May 8, 2024
@wrotki wrotki deleted the fix_fakestack_test_on_device branch May 8, 2024 19:23
wrotki added a commit to swiftlang/llvm-project that referenced this pull request May 9, 2024
The way the LIT RUN command is currently constructed ( %run not --crash
%t ) causes the test failure on devices - since 'not' is a LLVM built
command, not available on devices.

Changing the command to read 'not --crash %run %t' fixes it, as 'not'
now executes on the host running the test.

rdar://115914588

Co-authored-by: Mariusz Borsa <[email protected]>
(cherry picked from commit 63c38ba)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants