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

__wasm_call_ctors can break the interpreter #2673

Open
MDFL64 opened this issue Sep 6, 2021 · 1 comment
Open

__wasm_call_ctors can break the interpreter #2673

MDFL64 opened this issue Sep 6, 2021 · 1 comment
Labels

Comments

@MDFL64
Copy link

MDFL64 commented Sep 6, 2021

When compiling in debug mode, descriptor functions can generate calls to __wasm_call_ctors, which can cause it to try executing code the interpreter doesn't support. I only started running into this a few months ago on nightly rust builds.

This is admittedly probably my fault for linking with C++ code in a weird way, and not something most users will run in to. I'm not really sure what the best way of dealing with this is. I don't even fully understand why these calls are generated, and why only in debug mode. The bodge I've implemented is to just skip executing functions with this name, which feels very dumb.

I wasn't super enthusiastic about setting up a project to reproduce this, but I can on request.

@MDFL64 MDFL64 added the bug label Sep 6, 2021
@alexcrichton
Copy link
Contributor

Oh dear, thanks for the report! Were you perhaps compiling for the wasm32-wasi target though? If though I think wasm32-unknown-unknown will be your best bet for working with wasm-bindgen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants