diff options
author | Thomas Lively <tlively@google.com> | 2024-03-29 13:12:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 13:12:42 -0700 |
commit | 08a18cdaf95bcf46df851d15d09bfc3737f3fe2b (patch) | |
tree | 18010dad170d8b3890047292de3e98827a023a1d /src | |
parent | b10d59d1d201506eba1aaba035e699fec849ea60 (diff) | |
download | binaryen-08a18cdaf95bcf46df851d15d09bfc3737f3fe2b.tar.gz binaryen-08a18cdaf95bcf46df851d15d09bfc3737f3fe2b.tar.bz2 binaryen-08a18cdaf95bcf46df851d15d09bfc3737f3fe2b.zip |
Report timeout in interpretation of AtomicWait (#6452)
To avoid slow-running fuzz cases, we report a host limit when interpreting
atomic.wait with any non-zero timeout. However, in the allowed case where the
timeout is zero, we were incorrectly interpreting the wait as returning 0,
meaning that it was woken up, instead of 2, meaning that the timeout expired.
Fix it to return 2.
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-interpreter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 8da80afc9..8db33de74 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -3398,7 +3398,7 @@ public: if (timeout.getSingleValue().getInteger() != 0) { hostLimit("threads support"); } - return Literal(int32_t(0)); // equal + return Literal(int32_t(2)); // Timed out } Flow visitAtomicNotify(AtomicNotify* curr) { NOTE_ENTER("AtomicNotify"); |