Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented Apr 10, 2024

This would have found the bug in #6480 fairly easily (confirmed as finding it
within a few minutes).

@kripken kripken requested a review from tlively April 10, 2024 22:56
kripken added a commit that referenced this pull request Apr 11, 2024
… Heap2Local's (#6493) CFP already had logic for truncating but not for sign-extending, which this fixes. Use the new helper function in Heap2Local as well. This changes the model there from "truncate on set, sign-extend on get" to "truncate or sign-extend on get". That is both simpler by reusing the same logic as CFP but also more optimal: the idea to truncate on sets made sense since sets are rarer, but if we must then sign-extend on gets then we can end up doing more work overall (as the truncations on sets are not needed if all gets are signed). Found by #6486
kripken added a commit that referenced this pull request Apr 11, 2024
GUFA already truncated packed fields on write, which is enough for unsigned gets, but for signed gets we also need to sign them on reads. Similar to #6493 but for GUFA. Also found by #6486
@kripken
Copy link
Member Author

kripken commented Apr 11, 2024

After finding two bugs (#6493, #6494) things seem to have stabilized, landing.

@kripken kripken merged commit 81f72e8 into WebAssembly:main Apr 11, 2024
@kripken kripken deleted the fuzz.signed.get branch April 11, 2024 21:17
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants