wasmtime: Add a Config::native_unwind_info method (#4643)
This method configures whether native unwind information (e.g. `.eh_frame` on Linux) is generated or not. This helps integrate with third-party stack capturing tools, such as the system unwinder or the `backtrace` crate. It does not affect whether Wasmtime can capture stack traces in Wasm code that it is running or not. Unwind info is always enabled on Windows, since the Windows ABI requires it. This configuration option defaults to true. Additionally, we deprecate `Config::wasm_backtrace` since we can always cheaply capture stack traces ever since https://github.com/bytecodealliance/wasmtime/pull/4431. Fixes https://github.com/bytecodealliance/wasmtime/issues/4554
This commit is contained in:
@@ -172,7 +172,7 @@ impl Config {
|
||||
.wasm_simd(self.module_config.config.simd_enabled)
|
||||
.wasm_memory64(self.module_config.config.memory64_enabled)
|
||||
.wasm_threads(self.module_config.config.threads_enabled)
|
||||
.wasm_backtrace(self.wasmtime.wasm_backtraces)
|
||||
.native_unwind_info(self.wasmtime.native_unwind_info)
|
||||
.cranelift_nan_canonicalization(self.wasmtime.canonicalize_nans)
|
||||
.cranelift_opt_level(self.wasmtime.opt_level.to_wasmtime())
|
||||
.consume_fuel(self.wasmtime.consume_fuel)
|
||||
@@ -389,7 +389,7 @@ pub struct WasmtimeConfig {
|
||||
codegen: CodegenSettings,
|
||||
padding_between_functions: Option<u16>,
|
||||
generate_address_map: bool,
|
||||
wasm_backtraces: bool,
|
||||
native_unwind_info: bool,
|
||||
}
|
||||
|
||||
#[derive(Arbitrary, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
|
||||
Reference in New Issue
Block a user