Skip to content

Fix wasm_val_copy for null funcref/externref - #2041

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-clone-nu
Jul 17, 2020
Merged

Fix wasm_val_copy for null funcref/externref#2041
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-clone-nu

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit fixes Clone for wasm_val_t to avoid attempting to chase a
null pointer. It also fixes the implementation for FuncRef values by
cloning their internal wasm_ref_t as well.

This commit fixes `Clone for wasm_val_t` to avoid attempting to chase a
null pointer. It also fixes the implementation for `FuncRef` values by
cloning their internal `wasm_ref_t` as well.
@alexcrichton
alexcrichton requested a review from fitzgen July 17, 2020 18:42
@github-actions github-actions Bot added the wasmtime:c-api Issues pertaining to the C API. label Jul 17, 2020
@github-actions

Copy link
Copy Markdown

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:c-api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@fitzgen fitzgen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really happy I don't write C directly 😬

@alexcrichton
alexcrichton merged commit fbc05fa into bytecodealliance:main Jul 17, 2020
@alexcrichton
alexcrichton deleted the fix-clone-nu branch July 17, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:c-api Issues pertaining to the C API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants