-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
'assertion failed: table.elements[idx].is_some()' when compiling with LTO #1264
Comments
Thanks for the report! In the last week wasm-bindgen made a big internal change that migrated away from parity-wasm in favor of walrus Since then there have been a few issues that have popped up (for example #1254). This is probably related to that. I’m unsure of what the fix is but others have been squashing these bugs pretty quickly so we can wait on that. |
LLVM's mergefunc pass may mean that the same descriptor function is used for different closure invocation sites even when the closure itself is different. This typically only happens with LTO but in theory could happen at any time! The assert was tripping when we tried to delete the same function table entry twice, so instead of a `Vec<usize>` of entries to delete this commit switches to a `HashSet<usize>` which should do the deduplication for us and enusre that we delete each descriptor only once. Closes rustwasm#1264
@chinedufn is spot on, and this should be fixed at #1274. Thanks for the report @nstoddard! |
I have a project for which
wasm-bindgen
is failing when LTO is enabled:This works with
wasm-bindgen 0.2.32
so it seems to have regressed since then. I haven't yet been able to find a small repro case; I can look into that more if it would be helpful.The text was updated successfully, but these errors were encountered: