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

Segfault when running Lua example on macOS 10.14.1 #216

Closed
samdoiron opened this issue Feb 26, 2019 · 3 comments
Closed

Segfault when running Lua example on macOS 10.14.1 #216

samdoiron opened this issue Feb 26, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@samdoiron
Copy link

When running the lua.wasm example on macOS 10.14.1 the program segfaults when you attempt to define a function.

Reproduction:

examples :: λ → wasmer run lua.wasm
Lua 5.4.0  Copyright (C) 1994-2018 Lua.org, PUC-Rio
> function foo
"Runtime(Unknown { msg: \"trap at 0x0 - segmentation violation\" })"
@lachlansneff
Copy link
Contributor

Hi!

Yeah, we've also run into this issue recently. Lua uses setjmp and longjmp internally to approximate exceptions and it's actually impossible for us to safely emulate those two functions until we support wasm exceptions.

@syrusakbary syrusakbary added the bug Something isn't working label Mar 1, 2019
@syrusakbary
Copy link
Member

We actually found a solution imitating the error handling that emscripten does in js (thanks to #338).

Lua will be running properly once #334 is merged

@syrusakbary
Copy link
Member

This is now fixed in wasmer 0.3.0. Closing the issue

nlewycky added a commit that referenced this issue Aug 13, 2020
Implement "llvm-native" a mechanism for emitting wasm to native object files, to shared objects, to be dlopen'd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants