Stream: git-wasmtime

Topic: wasmtime / PR #1624 Revamp memory management of `Instance...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 22:00):

alexcrichton opened PR #1624 from fix-segfault to master:

This commit fixes a known but in Wasmtime where an instance could still
be used after it was freed. Unfortunately the fix here is a bit of a
hammer, but it's the best that we can do for now. The changes made in
this commit are:

Overall this should fix a known possible way to safely segfault Wasmtime
today (yay!) and it should also fix some flaikness I've seen on CI.
Turns out one of the spec tests
(bulk-memory-operations/partial-init-table-segment.wast) exercises this
functionality and we were hitting sporating use-after-free, but only on
Windows.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 22:01):

alexcrichton edited PR #1624 from fix-segfault to master:

This commit fixes a known but in Wasmtime where an instance could still
be used after it was freed. Unfortunately the fix here is a bit of a
hammer, but it's the best that we can do for now. The changes made in
this commit are:

Overall this should fix a known possible way to safely segfault Wasmtime
today (yay!) and it should also fix some flaikness I've seen on CI.
Turns out one of the spec tests
(bulk-memory-operations/partial-init-table-segment.wast) exercises this
functionality and we were hitting sporating use-after-free, but only on
Windows.

Closes https://github.com/bytecodealliance/wasmtime/issues/777

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 22:01):

alexcrichton edited PR #1624 from fix-segfault to master:

This commit fixes a known but in Wasmtime where an instance could still
be used after it was freed. Unfortunately the fix here is a bit of a
hammer, but it's the best that we can do for now. The changes made in
this commit are:

Overall this should fix a known possible way to safely segfault Wasmtime
today (yay!) and it should also fix some flaikness I've seen on CI.
Turns out one of the spec tests
(bulk-memory-operations/partial-init-table-segment.wast) exercises this
functionality and we were hitting sporating use-after-free, but only on
Windows.

Closes https://github.com/bytecodealliance/wasmtime/issues/777
Closes https://github.com/bytecodealliance/wasmtime/issues/960

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 22:07):

alexcrichton updated PR #1624 from fix-segfault to master:

This commit fixes a known but in Wasmtime where an instance could still
be used after it was freed. Unfortunately the fix here is a bit of a
hammer, but it's the best that we can do for now. The changes made in
this commit are:

Overall this should fix a known possible way to safely segfault Wasmtime
today (yay!) and it should also fix some flaikness I've seen on CI.
Turns out one of the spec tests
(bulk-memory-operations/partial-init-table-segment.wast) exercises this
functionality and we were hitting sporating use-after-free, but only on
Windows.

Closes https://github.com/bytecodealliance/wasmtime/issues/777
Closes https://github.com/bytecodealliance/wasmtime/issues/960

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 00:28):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 00:28):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 00:28):

sunfishcode created PR Review Comment:

Typo: InstnaceHandle

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 00:28):

sunfishcode created PR Review Comment:

Is this meant to be exported from the crate? It doesn't seem to be in lib.rs. If not, can this be pub(crate)?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 00:28):

sunfishcode created PR Review Comment:

Could you add a brief comment here mentioning that the Weak is just to break a reference cycle, and that it's always meant to be upgradable in practice?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 16:21):

alexcrichton updated PR #1624 from fix-segfault to master:

This commit fixes a known but in Wasmtime where an instance could still
be used after it was freed. Unfortunately the fix here is a bit of a
hammer, but it's the best that we can do for now. The changes made in
this commit are:

Overall this should fix a known possible way to safely segfault Wasmtime
today (yay!) and it should also fix some flaikness I've seen on CI.
Turns out one of the spec tests
(bulk-memory-operations/partial-init-table-segment.wast) exercises this
functionality and we were hitting sporating use-after-free, but only on
Windows.

Closes https://github.com/bytecodealliance/wasmtime/issues/777
Closes https://github.com/bytecodealliance/wasmtime/issues/960

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2020 at 17:47):

alexcrichton merged PR #1624.


Last updated: Nov 22 2024 at 16:03 UTC