-
Notifications
You must be signed in to change notification settings - Fork 57
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
Segfaulting the JVM #58
Comments
Thank you for the detailed report! Indeed, it looks like a double-free. That's curious. Can you provide a minimal working example so that I can try to reproduce please? |
It's part of a bigger library I am currently writing. It's still messy, I guess I could maybe invite you on my private repo? Are you comfortable at all with Clojure? But anyways, there really isn't much to it. The parts that leverage Wasmer are a very direct wrapper over the Java API. Essentially, it's exactly the same as using the Java API straight away. Maybe the problem is due to this debug-like behavior: creating an instance, calling a function right way, and closing it right away. Could this fast cycle be problematic? In a real application you would probably hold on the instance for a bit, that's maybe why no one had this issue before. |
I believe the best thing to do is to simply remove |
I agree with you that |
Describe the bug
I am currently developing WASM tooling and I am using
wasmer-java
interactively from Clojure. Sometimes, after a while, the JVM suddenly segaults because of Wasmer:And here is the full report: https://gist.github.com/helins-io/ffbb4e46eaf5b4adbfc960952ac577e9
Steps to reproduce
In an interactive session (using a Clojure REPL), I often load a WASM file, create an instance, execute a function and close that instance right away. At first nothing happens. However, after a while, I get this SIGSEV.
Additional context
"After a while" propably means when GC kicks in. I guess this could be a double free error where finalizing the instance object tries to free pointer(s) which were already freed manually when closing the instance myself. Sounds plausible after skimming at the report.
The text was updated successfully, but these errors were encountered: