-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Validation error: Trying to access parent frame stack values. #199
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
Comments
Thanks for the report! This may be an LLVM bug or a bug somewhere else, but unfortunately I can't seem to reproduce :( Can you create a standalone repo with a script to reproduce this? |
Thanks for the reply @alexcrichton! Hmm, wonder why it's not reproducing for you. I'm working on a WASM/Rust project and have been using this pattern for at least a week, but I just started encountering this bug. Here's the standalone repo with information on how to reproduce: Includes my wasm-bindgen version / rustc version, etc. Let me know if you think of any other useful information! |
This is not that useful, but I went back in the wasm-bindgen commit history to see if I could find any versions that work with the example. Once I got to Anyways, that wasn't the version of |
Oh yeah, I had this problem as well but forgot to post an issue about it. Rolling back to |
Thanks @jsheard! That helped make the search a lot faster :). Installed a previous nightly version with: Rolling back to that version with override in my project directory: Confirmed that it works with the latest wasm-bindgen (0.2.10) for my project as well as the standalone repo. |
Here's a short example that also has the problem, although it does pull in quite a lot of crates. #![feature(proc_macro, wasm_custom_section, wasm_import_module)]
extern crate wasm_bindgen;
extern crate image;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn read_img() {
image::load_from_memory(&[]);
}
Here's the generated, garbage-collected WASM:
If I roll back to |
This is because of this issue: rustwasm/wasm-bindgen#199 Which was introduced in the rustc nightly version sometime after 2018-05-09.
Hm ok thanks for the file @shepmaster! Attempting to run that file through tools like |
Hm I still can't reproduce though and actually generate a corrupt wasm file myself. Would someone be willing to make something like a docker image which reproduces this? |
Ah ok I was able to reproduce with the instructions in rust-lang/rust#50869 and get an upstream LLVM bug, so I'm going to close this in favor of the rust-lang/rust issue |
Hi, I'm getting a super strange error with wasm-bindgen that I wasn't seeing in the past few days.
Basically when I'm pushing a boxed trait object to some storage (a
Vec<Box<_>>
), wasm-bindgen fails with:It looks like it's running the output wasm file through an interpreter to figure out the signature of the exposed functions(?).
Here's the minimal
lib.rs
I'm managed to compile this down to:The way I tested this was to create a new hello-world project from the README and sub in this
lib.rs
and run:cargo build --target wasm32-unknown-unknown && wasm-bindgen target/wasm32-unknown-unknown/debug/wasm_validation_64.wasm --out-dir .
There's also a lot of weird ways to make this go through wasm-bindgen without complaining, see the comments. Does anyone know why this might be happening?
The text was updated successfully, but these errors were encountered: