Skip to content

v2.0.1 - 2026/11/18

Choose a tag to compare

@github-actions github-actions released this 17 Nov 23:53
· 19 commits to main since this release
v2.0.1
102989b

Added

  • The unstable crate feature now uses Rust's unstable rust-preserve-none ABI for execution handlers. #2036
    • Takes effect on x86_64 and aarch64 targets; other targets fall back to the Rust ABI.
    • Thanks to Noa for implementing it!

Fixes

  • Removes stack frames for {memory,table}.grow execution handlers. #2066
    • This fixes a bug that could lead to a stackoverflow with certain Wasm inputs.
    • Thanks to Jack Dishman for reporting the bug!
  • Improves performance and memory consumption of instantiating linear memories in some cases. #2064
    • Thanks to Bruno Bowden for reporting this performance issue!
  • Fix a divide-by-zero issue in enforce_limits for some malformed Wasm inputs. #2068
  • Fuel metering now charges for zero-initializing non-parameter function locals. #2041
    • Costs 1 fuel per 8 Wasm locals, rounded up.
    • Thanks to Peng Wang for reporting and fixing the issue!
  • Fix a bug where functions escaping a failed instantiation could access a partially initialized instance. #2076
  • Fix select fused with a zero test (e.g. x != 0) of a slot operand. #2048
  • auto-dispatch now falls back to portable dispatch if debug-assertions are enabled. #2050
    • This fixes a stackoverflow in optimized debug builds using [profile.dev.package.wasmi] opt-level = 3.
    • Requires Cargo 1.93 or newer and only detects debug-assertions set via Cargo profiles, not via RUSTFLAGS.
    • Thanks to soraxa-dev for reporting the bug!
    • Thanks to Kansuke Habano for fixing the bug!
  • Fix a translation panic for stores whose address and value alias the same register. #2098
    • Only affected stores that cannot use the (memory 0) fast path, e.g. offsets above u16::MAX.
    • Thanks to Sven Kubisch for reporting the bug!
  • Fix a panic when growing a memory64 declared with the largest allowed maximum size. #2053
    • This also fixes memory.grow being wrongly denied by StoreLimits on 32-bit hosts due to a truncated maximum size.
    • Thanks to Sharadhi V for reporting and fixing the bug!
  • Fix a panic when memory.grow exceeds the capacity of a Memory::new_static buffer. #2086
  • Fix an off-by-one allowing 32-bit memories with 1-byte pages to have 2^32 pages. #2087
  • Fix a miscompilation where a local.set in a branch of a block, loop or if with parameters could clobber an earlier local.get of the same local. #2088
  • Fix a use-after-free when memory.grow grows (memory 0) through another memory index aliasing it. #2051
    • This could happen if the same linear memory is imported more than once.
    • Thanks to Sharadhi V for reporting and fixing the bug!
  • Fix a Stacked/Tree Borrows violation of the cached (memory 0) pointer. #2090
  • Memory::new, Memory::new_static and Table::new now respect ResourceLimiter::{memories,tables}. #2091
    • Previously, host-created memories and tables could exceed these limits, failing later instantiations instead.
  • Fix resumable calls running out of fuel in table.grow resuming at the wrong instruction. #2056
    • This re-executed already executed code, e.g. global or memory stores and host calls.
    • Thanks to Sharadhi V for reporting and fixing the bug!
  • Add the missing wasmi_error_message definition to the Wasmi C-API. #2092
  • Fix prefix-symbols affecting Wasmi C-API wasmi_* functions; only wasm_* functions are prefixed now. #2094
    • This mangled wasmi_error_new, wasmi_error_delete and wasmi_store_delete.
  • Fix instantiation counting imported memories and tables against ResourceLimiter::{memories,tables}. #2083
    • Only the memories and tables a module defines are counted now.
    • Thanks to Anthony Menghi for reporting and fixing the bug!
  • Re-export LimiterError in wasmi::errors so that ResourceLimiter can be implemented without depending on wasmi_core. #2082
  • Fix memory.grow past the declared maximum bypassing the ResourceLimiter. #2084
    • With StoreLimitsBuilder::trap_on_grow_failure(true) this now traps instead of returning -1, as for tables.
    • Thanks to Anthony Menghi for reporting and fixing the bug!