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

Update wasm-tools crates to latest versions. #6394

Merged
merged 3 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 55 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-arra

target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] }
anyhow = "1.0.22"
wasmparser = "0.104.0"
wat = "1.0.63"
wast = "57.0.0"
wasmprinter = "0.2.56"
wasm-encoder = "0.26.0"
wasm-smith = "0.12.7"
wasm-mutate = "0.2.24"
wasmparser = "0.105.0"
wat = "1.0.64"
wast = "58.0.0"
wasmprinter = "0.2.57"
wasm-encoder = "0.27.0"
wasm-smith = "0.12.8"
wasm-mutate = "0.2.25"
wit-parser = "0.7.1"
windows-sys = "0.48.0"
env_logger = "0.10"
Expand Down
3 changes: 3 additions & 0 deletions cranelift/wasm/src/code_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2347,6 +2347,9 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
op
));
}
Operator::I31New | Operator::I31GetS | Operator::I31GetU => {
unimplemented!("GC operators not yet implemented")
}
};
Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions crates/wasmtime/src/engine/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ impl Metadata {
saturating_float_to_int: _,
sign_extension: _,
floats: _,
gc: _,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind binding this as gc and asserting it's false down below (like memory_control)? We'll want to turn this on eventually and we won't want to forget to add handling here.

} = engine.config().features;

assert!(!memory_control);
Expand Down
15 changes: 15 additions & 0 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,18 +832,33 @@ fn generate_coredump(err: &anyhow::Error, source_name: &str, coredump_path: &str
.ok_or_else(|| anyhow!("no wasm backtrace found to generate coredump with"))?;

let coredump = wasm_encoder::CoreDumpSection::new(source_name);
let mut coremodules = wasm_encoder::CoreDumpModulesSection::new();
let mut stacksection = wasm_encoder::CoreDumpStackSection::new("main");
let mut modulenames = std::collections::HashSet::new();
for f in bt.frames() {
modulenames.insert(f.module_name().unwrap_or("<unknown>"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the modulenames set be deferred until the frame -> instance -> module mapping can be created? Otherwise there isn't anything pointing to the module names I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I debated leaving that out, since it's essentially the same deal as instances. I'll remove it.


// We don't have the information at this point to map frames to
// individual instances of a module, so we won't be able to create the
// "frame ∈ instance ∈ module" hierarchy described in the core dump spec
// until we move core dump generation into the runtime. So for now
// instanceidx will be 0 for all frames
let instanceidx = 0;
stacksection.frame(
instanceidx,
f.func_index(),
u32::try_from(f.func_offset().unwrap_or(0)).unwrap(),
// We don't currently have access to locals/stack values
[],
[],
);
}
for name in modulenames {
coremodules.module(name);
}
let mut module = wasm_encoder::Module::new();
module.section(&coredump);
module.section(&coremodules);
module.section(&stacksection);

let mut f = File::create(coredump_path)
Expand Down
Loading