diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/fuzzing.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index 0b3dbf78e..19bff428e 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -174,6 +174,9 @@ private: // Whether to emit atomics static const bool ATOMICS = true; + // Whether to emit atomic waits (which in single-threaded mode, may hang...) + static const bool ATOMIC_WAITS = false; + // after we finish the input, we start going through it again, but xoring // so it's not identical int xorFactor = 0; @@ -1242,16 +1245,16 @@ private: if (!ATOMICS || (type != i32 && type != i64)) return makeTrivial(type); wasm.memory.shared = true; if (type == i32 && oneIn(2)) { - if (oneIn(2)) { + if (ATOMIC_WAITS && oneIn(2)) { auto* ptr = makePointer(); auto expectedType = pick(i32, i64); auto* expected = make(expectedType); auto* timeout = make(i64); - return builder.makeAtomicWait(ptr, expected, timeout, expectedType); + return builder.makeAtomicWait(ptr, expected, timeout, expectedType, logify(get())); } else { auto* ptr = makePointer(); auto* count = make(i32); - return builder.makeAtomicWake(ptr, count); + return builder.makeAtomicWake(ptr, count, logify(get())); } } Index bytes; |