[compiler-rt] [compiler-rt] Avoid generating coredumps when piped to a tool (PR #83701)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 22:31:44 PST 2024
================
@@ -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);
----------------
arichardson wrote:
We don't have that define available in this standalone test binary, so I've kept the ifdefs.
https://github.com/llvm/llvm-project/pull/83701
More information about the llvm-commits
mailing list