-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
First of all, I can't reproduce this issue in the master branch of wasmoon.
What I did:
- I compile lua and c files in my project, with emscripten's SAFE_HEAP option set to 1.
- I compile wasmoon with the glue.js.
- I run wasmoon with glus.wasm.
Testcase:
const { LuaFactory } = require('./index');
(async () => {
// Initialize a new lua environment factory
const factory = new LuaFactory();
// Create a standalone lua environment from the factory
const lua = await factory.createEngine();
lua.global.close();
})();Error:
Aborted(alignment fault)
/Users/zhanqp/src/sconn_client/test/nodejs/index.js:1829
/** @suppress {checkTypes} */ var e = new WebAssembly.RuntimeError(what);
^
RuntimeError: Aborted(alignment fault)
at abort (/Users/zhanqp/src/sconn_client/test/nodejs/index.js:1829:45)
at alignfault (/Users/zhanqp/src/sconn_client/test/nodejs/index.js:1600:7)
at sconn_client.wasm (wasm://wasm/sconn_client.wasm-002ca6f6:wasm-function[1360]:0xa5ffa)
at sconn_client.wasm.gettable (wasm://wasm/sconn_client.wasm-002ca6f6:wasm-function[789]:0x6e6f7)
at sconn_client.wasm.lua_rawgeti (wasm://wasm/sconn_client.wasm-002ca6f6:wasm-function[791]:0x6e910)
at sconn_client.wasm.luaL_unref (wasm://wasm/sconn_client.wasm-002ca6f6:wasm-function[72]:0x52ac)
at /Users/zhanqp/src/sconn_client/test/nodejs/index.js:1861:16
at Object.ccall (/Users/zhanqp/src/sconn_client/test/nodejs/index.js:5772:17)
at LuaWasm.pointersToBeFreed [as luaL_unref] (/Users/zhanqp/src/sconn_client/test/nodejs/index.js:6777:49)
at FunctionTypeExtension.close (/Users/zhanqp/src/sconn_client/test/nodejs/index.js:715:38)
Node.js v20.18.0This issue happens when FunctionTypeExtension.close trying to close a lua thread.
Metadata
Metadata
Assignees
Labels
No labels