-
Notifications
You must be signed in to change notification settings - Fork 45
rust: improve error checking and avoid double shutdown #82
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
Conversation
3baa873 to
42480ff
Compare
|
I tested this out today with Wasmtime in a variety of settings:
This "data file is corrupted" might be a separate error; not sure at this point. (Also, shouldn't I be seeing a |
Yeah, never mind: with modules that have functions I do see tag 16 events. Data file is still corrupted, though. |
|
Sorry, I've got no ideas about the corrupted report, I've never seen that before. |
|
@jlb6740, did you want to review this? If not, I think we should merge it since it resolves some of the problems we were seeing. |
|
Yeah, sorry for the delay; I think this is the right thing to do even if all the issues aren't completely sorted out. |
|
Thanks @abrown! I'll look into profiling with vtune into our wasmtime embedding soonish, so I'll let you know if I run into other errors. |
|
Thanks for this fix! |
The documentation of the
iJIT_METHOD_LOADevent states that when calling intonotify_eventwith that event, the return type is undefined, so we can't really tell whether that worked or not. So far, the library assumed that this would return 1, which is only the case when the event type isSHUTDOWN. This PR fixes that.Also, avoid a double shutdown. I don't know if this prevents actual issues, but better be safe than sorry.