Skip to content

Conversation

@ndrewh
Copy link
Contributor

@ndrewh ndrewh commented Nov 19, 2025

#168137 fixed an issue where this test failed because there was not a sufficiently large file in the corpus.

However, there is still another issue: the MERGE-INNER process can try to write a control file that is above the 1024B limit. This also fails the test, since the test expects the MERGE-OUTER process to be the one to get the SIGXFSZ.

To get around this, increase the ulimit to 4K and the largest testcase to 4K (plus 6B). We will assume that on every test platform, the control file will be less than 4K.

rdar://164738648

168137 fixed an issue where this test failed because there
was not a sufficiently large file in the corpus.

However, there is still another issue: the MERGE-INNER process
can try to write a control file that is above the 1024B limit.
This also fails the test, since the test expects the MERGE-OUTER
process to be the one to get the SIGXFSZ.

To get around this, increase the ulimit to 4K and the largest
testcase to 4K (plus 6B). We will assume that on every test platform,
the control file will be less than 4K.

rdar://164738648
@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2025

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

Author: Andrew Haberlandt (ndrewh)

Changes

#168137 fixed an issue where this test failed because there was not a sufficiently large file in the corpus.

However, there is still another issue: the MERGE-INNER process can try to write a control file that is above the 1024B limit. This also fails the test, since the test expects the MERGE-OUTER process to be the one to get the SIGXFSZ.

To get around this, increase the ulimit to 4K and the largest testcase to 4K (plus 6B). We will assume that on every test platform, the control file will be less than 4K.

rdar://164738648


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

1 Files Affected:

  • (modified) compiler-rt/test/fuzzer/merge-posix.test (+2-2)
diff --git a/compiler-rt/test/fuzzer/merge-posix.test b/compiler-rt/test/fuzzer/merge-posix.test
index 5e342142216f8..6e37651e6fd29 100644
--- a/compiler-rt/test/fuzzer/merge-posix.test
+++ b/compiler-rt/test/fuzzer/merge-posix.test
@@ -14,10 +14,10 @@ RUN: echo ....U. > %tmp/T2/2
 RUN: echo ...Z.. > %tmp/T2/3
 RUN: echo ...Z.. > %tmp/T2/4
 RUN: echo ....E. > %tmp/T2/5
-RUN: %python -c "print('.....R' + 'X' * 1024, end='')" > %tmp/T2/6
+RUN: %python -c "print('.....R' + 'X' * 4096, end='')" > %tmp/T2/6
 
 # Check that we can report an error if file size exceeded
-RUN: (ulimit -f 1; not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
+RUN: (ulimit -f 4; not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
 SIGXFSZ: ERROR: libFuzzer: file size exceeded
 
 # Check that we honor TMPDIR

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 5820 tests passed
  • 1319 tests skipped

@ndrewh ndrewh requested a review from wrotki November 19, 2025 01:39
Copy link
Contributor

@DanBlackwell DanBlackwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating

@ndrewh ndrewh merged commit c6775e2 into llvm:main Nov 19, 2025
14 checks passed
ndrewh added a commit to ndrewh/llvm-project that referenced this pull request Nov 21, 2025
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.

3 participants