- In wasmtime 0.38.1, disabling stack tracing results in a
setting "unwind_info" is configured to Bool(false) which is not supported due to
|
"unwind_info" => *value == FlagValue::Bool(true), |
.
- On master, backtraces can be disabled, but cranelift's "unwind_info" isn't set to false (it just isn't set). This is making one of our tests 1000x slower (0.12 seconds to 120 seconds).
I can fix this with:
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index b41ae9396..256009a0a 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -1423,6 +1423,10 @@ impl Config {
{
bail!("compiler option 'unwind_info' must be enabled when either 'backtraces' or 'reference types' are enabled");
}
+ } else {
+ unsafe {
+ self.cranelift_flag_set("unwind_info", "false");
+ }
}
if self.features.reference_types {
if !self
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs
index 9dd637e71..83514d72c 100644
--- a/crates/wasmtime/src/engine.rs
+++ b/crates/wasmtime/src/engine.rs
@@ -345,7 +345,7 @@ impl Engine {
// can affect the way the generated code performs or behaves at
// runtime.
"avoid_div_traps" => *value == FlagValue::Bool(true),
- "unwind_info" => *value == FlagValue::Bool(true),
+ "unwind_info" => true,
"libcall_call_conv" => *value == FlagValue::Enum("isa_default".into()),
// Features wasmtime doesn't use should all be disabled, since
But I'm wondering if:
- The other settings (reference types, simd) need to be explicitly set as well.
- There's a bad default somewhere. Should
unwind_info be disabled by default in cranelift?
setting "unwind_info" is configured to Bool(false) which is not supporteddue towasmtime/crates/wasmtime/src/engine.rs
Line 325 in 9e2adfb
I can fix this with:
But I'm wondering if:
unwind_infobe disabled by default in cranelift?