Stream: git-wasmtime

Topic: wasmtime / PR #3223 cranelift: Prevent panics when dividi...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 14:36):

afonso360 opened PR #3223 from interpreter-fix-div-panic to main:

Closes #3191

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 23:08):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 23:08):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 23:08):

abrown created PR review comment:

I obviously don't understand this change because I would have expected the interpreter to trap in this situation but here it happily returns 0?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 23:48):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 23:48):

cfallin created PR review comment:

I guess it's udiv vs. sdiv? 32768 / 65535 (-1) is ~0.5 or 0 rounded down.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 08:01):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 08:01):

afonso360 created PR review comment:

Yes exactly, udiv is not supposed to trap in this situation (only sdiv). The -1 is a bit misleading here, because the denominator is interpreted as 0xFFFF.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 08:04):

afonso360 updated PR #3223 from interpreter-fix-div-panic to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 16:27):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 16:27):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 16:27):

abrown created PR review comment:

Ah, that's it, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2021 at 16:27):

abrown merged PR #3223.


Last updated: Oct 23 2024 at 20:03 UTC