-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[ASan] Disable test that sets call stack on Darwin #170786
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
[ASan] Disable test that sets call stack on Darwin #170786
Conversation
This test fails with the internal shell as we implement ulimit with a python wrapper. This python wrapper fails on recent versions of MacOS to set the stack size limit lower, or even to the current values. More discussion is in python/cpython#78783 towards the bottom (it seems like a new issue should be opened). It does not seem like we lose significant test coverage by disabling this on MacOS as the test running on Linux should catch any major regressions. We can also simply reenable once the issue is fixed (although writing a simple c program with calls setrlimit directly also fails in the smae manner).
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Aiden Grossman (boomanaiden154) ChangesThis test fails with the internal shell as we implement ulimit with a python wrapper. This python wrapper fails on recent versions of MacOS to set the stack size limit lower, or even to the current values. More discussion is in python/cpython#78783 towards the bottom (it seems like a new issue should be opened). It does not seem like we lose significant test coverage by disabling this on MacOS as the test running on Linux should catch any major regressions. We can also simply reenable once the issue is fixed (although writing a simple c program with calls setrlimit directly also fails in the smae manner). Full diff: https://github.com/llvm/llvm-project/pull/170786.diff 1 Files Affected:
diff --git a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
index 1342eae927794..c4e519fa61830 100644
--- a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
@@ -1,5 +1,9 @@
// Check that UAR mode can handle very deep recursion.
// REQUIRES: shell
+// TODO(boomanaiden154): This test currently fails with the internal
+// shell because python is not able to set RLIMIT_STACK. We should
+// reenable this when the behavior is fixed.
+// UNSUPPORTED: system-darwin
// RUN: %clangxx_asan -O2 %s -o %t
// RUN: ulimit -s 4096
// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s
|
|
I run into the same issue when calling |
|
Thanks for all the work on the internal shell! I'm planning to look at fixing the remaining sanitizer internal shell failures on Darwin later today (but if you're already working on some of them lmk). I think disabling this test for now is reasonable. |
|
@boomanaiden154 fwiw I also have the test failure using the lit internal shell but this program works and shows the limits correctly: I am slightly surprised that setrlimit is getting EINVAL if it really is the same function call - which this suggests it should be: |
This should be the last one looking at the previous failure logs. |
Yeah, looks like in my case the example I copied and pasted from the cpython thread used would still fail for you. More investigation is needed, and I'll file a bug with upstream python assuming it reproduces with Python 3.14. I will land this patch though to unblock enabling the internal shell by default. |
|
I filed python/cpython#142317 to at least track this. |
|
hi @boomanaiden154 I was wondering about the test you disabled in 75aa7bd, it already has Are you intentionally setting leaving the shell feature included somewhere? I think it may be included because of the logic here but I am not sure. |
The shell feature should get added everywhere except Windows. We really should replace all of the |
This test fails with the internal shell as we implement ulimit with a python wrapper. This python wrapper fails on recent versions of MacOS to set the stack size limit lower, or even to the current values. More discussion is in python/cpython#78783 towards the bottom (it seems like a new issue should be opened). It does not seem like we lose significant test coverage by disabling this on MacOS as the test running on Linux should catch any major regressions. We can also simply reenable once the issue is fixed (although writing a simple c program with calls setrlimit directly also fails in the smae manner).
This test fails with the internal shell as we implement ulimit with a python wrapper. This python wrapper fails on recent versions of MacOS to set the stack size limit lower, or even to the current values. More discussion is in python/cpython#78783 towards the bottom (it seems like a new issue should be opened).
It does not seem like we lose significant test coverage by disabling this on MacOS as the test running on Linux should catch any major regressions. We can also simply reenable once the issue is fixed (although writing a simple c program with calls setrlimit directly also fails in the smae manner).