-
-
Notifications
You must be signed in to change notification settings - Fork 670
AssemblyScript crashes with bus error
#2740
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
That looks like a Node.js crash. This isn't an AS issue. This is more likely a bug in V8 or Node.js. The "bus error" rang some bells, and using the latest version of Node might fix this, since it may include a fix for nodejs/node#46559. Or maybe it won't; I don't know how their versioning works. In that case, you may have to build Node from the master branch and try to reproduce your issue with that build to see if it still persists. |
@CountBleck The bugfix of nodejs/node#46559 was included in Node.js 20.4.0, and I have updated to Node.js 20.6.1. But the crash persists: ![]() |
Now that's something I can work with. |
Never mind, I am mistaken; only half of RTTI was removed. |
I also meet similar issue and then fixed bug in nodejs. It looks like a GC related issue. Do you have some stable reproduction? |
@HerrCai0907 I agree it is most likely a Node.js-specific issue, as I can't reproduce the issue on the AssemblyScript playground. I've provided my relatively small code base in my original issue, it should be good enough to start with: https://github.com/SukkaW/cidr-tools-wasm And the code on the AssemblyScript playground. |
@SukkaW A short term work around solution is removing esm option and load Webassembly module by Nodejs API or @assemblyscript/loader. diff --git a/asconfig.json b/asconfig.json
index acd9620..a06e1e6 100644
--- a/asconfig.json
+++ b/asconfig.json
@@ -18,7 +18,5 @@
"noAssert": true
}
},
- "options": {
- "bindings": "esm"
- }
+ "options": {}
} import { readFileSync } from "fs";
let exports = (
await WebAssembly.instantiate(readFileSync("build/debug.wasm"), {
env: {
abort: (a, b, c, d) => {
console.log(a, b, c, d);
},
},
})
).instance.exports; |
|
Bug description
I guess there might be an OOB error that causes Node.js to exit with a low-level
bus error
.The source code of the wasm has been attached to the playground, link below.
Note that the error occurs on Node.js 18.17.1, MacBook Pro 2019. But I can't reproduce the error on the AssemblyScript playground.
Steps to reproduce
The original repo: https://github.com/SukkaW/cidr-tools-wasm
Here is the reproduction at the AssemblyScript playground.
AssemblyScript version
v0.27.9
The text was updated successfully, but these errors were encountered: