-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime-core) Avoid crashing when missing host functions are allowed #1128
fix(runtime-core) Avoid crashing when missing host functions are allowed #1128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just want you to double check the public API changes and make sure we're at least aware of any breaking changes happening here
/// Get the underlying func pointer. | ||
pub fn get_vm_func(&self) -> NonNull<vm::Func> { | ||
self.func | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop. It was implemented for Func<Kind = Wasm, …>
only, now it's implemented for Kind = Wasm
and Kind = Host
.
bors r+ |
1128: fix(runtime-core) Avoid crashing when missing host functions are allowed r=Hywan a=Hywan Fix #1118. #1121 can be merged after This PR fixes 2 things: * When droping the import backing, check that `vm::FuncCtx` isn't null before dropping it, * Use an `always_trap` as a placeholder host function when a host function is missing. Co-authored-by: Ivan Enderlin <[email protected]>
Build succeeded
|
Fix #1118.
Address #1121.
This PR fixes 2 things:
vm::FuncCtx
isn't null before dropping it,always_trap
as a placeholder host function when a host function is missing.