| Summary: | WebAssembly i32.atomic.wait timeout value incorrectly interpreted by factor 1000 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | JP Posma <me> | ||||||||
| Component: | WebAssembly | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | alonzakai, ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, saam, sbc, tzagallo, webkit-bug-importer, ysuzuki | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Mac (Intel) | ||||||||||
| OS: | macOS 11 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
JP Posma
2022-01-03 16:28:52 PST
For completeness, here is the spec for this instruction: https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md#wait (not sure if there's a more official W3C version somewhere, too) Also, props to my teammate Paras Sanghavi for finding this! Created attachment 448265 [details]
Patch
Created attachment 448267 [details]
Patch
Thanks for the quick fix Yusuke! That looks good to me. Comment on attachment 448267 [details]
Patch
r=me
Committed r287575 (245706@main): <https://commits.webkit.org/245706@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448267 [details]. We had at least one user report the effect of this bug when using pthreads under emscripten: https://github.com/emscripten-core/emscripten/issues/16499. Do we know how many versions of safari this bug might have shipped in? Or maybe which devices were effected? I'm hoping we can avoid doing some kind of mitigation (perhaps reverting back to the JS API for some period of time). Off my a factor 1000 in usleep() is pretty serious. (In reply to Sam Clegg from comment #8) > We had at least one user report the effect of this bug when using pthreads > under emscripten: https://github.com/emscripten-core/emscripten/issues/16499. > > Do we know how many versions of safari this bug might have shipped in? Or > maybe which devices were effected? I'm hoping we can avoid doing some kind > of mitigation (perhaps reverting back to the JS API for some period of > time). Off my a factor 1000 in usleep() is pretty serious. I believe this fix shipped in Safari 15.4. So anything before then will have the issue. |