Skip to content
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(InstanceContext): Don't use uintptr for Data #94

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

AdamSLevy
Copy link
Contributor

Previously an uintptr to user data was passed across the CGo FFI which
would become invalid if any stack frame occurred. This commit avoids
this by never passing any pointers across the CGo FFI. A registry map is
used instead to keep Go data on the Go side, and only an int index into
the map is passed across to the C side.

fix #93
re #44 #85 #83

Previously an uintptr to user data was passed across the CGo FFI which
would become invalid if any stack frame occurred. This commit avoids
this by never passing any pointers across the CGo FFI. A registry map is
used instead to keep Go data on the Go side, and only an int index into
the map is passed across to the C side.

fix wasmerio#93
re wasmerio#44 wasmerio#85 wasmerio#83
@Hywan Hywan self-assigned this Dec 4, 2019
@Hywan Hywan added 🐞 bug Something isn't working 📦 component-extension About the Go extension labels Dec 6, 2019
Copy link
Contributor

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

It looks good to me. Thank you very much!

@Hywan Hywan merged commit 2fa9553 into wasmerio:master Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 📦 component-extension About the Go extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InstanceContext.Data pointers may become stale and cause panics
2 participants