aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2024-03-13 13:13:52 -0700
committerFangrui Song <i@maskray.me>2024-03-13 13:13:52 -0700
commit9ce8691dea8dadc1302abacf4302f3b805e1448d (patch)
treefdc2da3081156b4c9b80b0d417f090efadac946c /compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp
parent795e3c3d94da0a664642d4580d87c82c02d5eca4 (diff)
parent744a23f24b08e8b988b176173c433d64761e66b3 (diff)
downloadllvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.zip
llvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.tar.gz
llvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.tar.bz2
[𝘀𝗽𝗿] changes introduced through rebaseusers/MaskRay/spr/main.llvm-objcopy-add-compress-sections
Created using spr 1.3.5-bogner [skip ci]
Diffstat (limited to 'compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp')
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp b/compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp
index 2378a4cf..fed2e1d 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/corelimit.cpp
@@ -10,7 +10,12 @@ int main() {
getrlimit(RLIMIT_CORE, &lim_core);
void *p;
if (sizeof(p) == 8) {
- assert(0 == lim_core.rlim_cur);
+#ifdef __linux__
+ // See comments in DisableCoreDumperIfNecessary().
+ assert(lim_core.rlim_cur == 1);
+#else
+ assert(lim_core.rlim_cur == 0);
+#endif
}
return 0;
}