alexcrichton opened PR #8018 from alexcrichton:more-table-type-safety
to bytecodealliance:main
:
This commit is an attempt to make the mistake fixed in #8016 harder to happen again. This removes the
set_raw
helper entirely from tables and instead forces all callers to view the table as either a table of funcrefs or a table of externefs. By forcing that choice outwards instead of handling it inwards it enables dealing with a typed table in more contexts which should help naturally do the right thing.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #8018.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8018.
alexcrichton requested fitzgen for a review on PR #8018.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Relative to https://github.com/bytecodealliance/wasmtime/pull/8016 this was the other issue I found, this forgot to check whether the table was an externref table or funcref table and triggered a panic by assuming a global was a funcref.
fitzgen submitted PR review.
fitzgen merged PR #8018.
Last updated: Nov 22 2024 at 16:03 UTC