From d32f97238c903765dec4e9a9f3cbfa5fd12cded6 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 10 Aug 2026 11:11:18 -0700 Subject: Chapter 25: Modules, Separate Compilation, and SSA Construction Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki Co-authored-by: Claude Opus 5 --- .../java/com/seaofnodes/simple/FuzzerWrap.java | 46 ++++++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) (limited to 'src/test/java/com/seaofnodes/simple/FuzzerWrap.java') diff --git a/src/test/java/com/seaofnodes/simple/FuzzerWrap.java b/src/test/java/com/seaofnodes/simple/FuzzerWrap.java index b022bec9..68bbe918 100644 --- a/src/test/java/com/seaofnodes/simple/FuzzerWrap.java +++ b/src/test/java/com/seaofnodes/simple/FuzzerWrap.java @@ -7,19 +7,37 @@ import org.junit.Test; import static org.junit.Assert.assertTrue; /** - * Normal tests run chapter-local regression seeds. Open failures and exploratory - * fuzzing are opt-in (run directly in the IDE or temporarily remove Ignore). - * Seeds depend on this chapter's generator; do not copy them between chapters. + * To use the fuzzer run the fuzzPeeps methods. + * This can be done from IntelliJ Gui or remove the `@Ignore` annotation and start the test case from the command line + * via mvn clean test -Dtest=com.seaofnodes.simple.Fuzzer08Test#fuzzPeeps */ public class FuzzerWrap { private static final long[] REGRESSION_SEEDS = { + 375135762521757909L, // bad LCA + -148471672577312953L, // bulk mem + -5037182906211190034L, // dead Guard control + -6359653295501938199L, // monotonicity, escape is dead + 6506797708065910879L, // required field without a user constructor + 650692970082394944L, // recursive bulk mem split + 8335100609598232836L, // ternary result killed by region cleanup + 2520958273643234516L, // nested guard merge + -3772838984504063325L, // fuzzer regression + -4628356252269023530L, // idepth cache version wrap + -4022199781524079249L, // fuzzer regression + 8824787517620928178L, // unknown-mode unary minus during SCCP + -673501011619761901L, // peephole killed self + -8212834489697770130L, // bad keep/unkeep in parser + 478567486335112458L, // dying escape node + -5114548365532699915L, // dominate flags dependencies + -4710931876754133070L, // Tests monotonic phi widening }; private static final long[] OPEN_FAILING_SEEDS = { }; - @Test public void fuzzPeepsRegression () { fuzzPeepsSeeds(REGRESSION_SEEDS); } + + @Test public void fuzzPeepsRegression () { fuzzPeepsSeeds( REGRESSION_SEEDS); } @Test @Ignore public void fuzzPeepsOpenFailures() { fuzzPeepsSeeds(OPEN_FAILING_SEEDS); } private static void fuzzPeepsSeeds(long... seeds) { @@ -30,29 +48,31 @@ public class FuzzerWrap { @Ignore @Test - public void fuzzPeepsLarge() { + public void fuzzPeepsRandom() { + Random R = new Random(System.currentTimeMillis()); var fuzzer = new Fuzzer(); - for (int i=0; i<1000000; i++) - fuzzer.fuzzPeeps(i); + for (int i=0; i<100; i++) + fuzzer.fuzzPeeps(R.nextLong()); assertTrue(fuzzer.noExceptions()); } - @Test @Ignore - public void fuzzPeepsRandom() { - Random R = new Random(System.currentTimeMillis()); + @Ignore + @Test + public void fuzzPeepsLarge() { var fuzzer = new Fuzzer(); - for (int i=0; i<100; i++) - fuzzer.fuzzPeeps( R.nextLong()); + for (int i=0; i<1000000; i++) + fuzzer.fuzzPeeps(i); assertTrue(fuzzer.noExceptions()); } - @Test @Ignore + @Test public void fuzzPeepTiming() { var fuzzer = new Fuzzer(); int max_nid=0; for (int i=0; i<1000000; i++) max_nid = fuzzer.fuzzPeepTiming(i, max_nid); } + } -- cgit v1.2.3