Skip to content

wasmtime v9 jit panics when using ProfilingStrategy::PerfMap #6433

@repi

Description

@repi

Test Case

The Linux perf support enabled with ProfilingStrategy::PerfMap now with wasmtime v9.0.0 panics in wasmtime-jit

Steps to Reproduce

Compile a module with config.profiler(wasmtime::ProfilingStrategy::PerfMap);

Expected Results

It compiles

Actual Results

It panics inside wasmtime-jit on an Option::unwrap from:

    /// Returns an iterator over all array-to-Wasm trampolines defined within
    /// this module, providing both their index and their in-memory body.
    pub fn array_to_wasm_trampolines(
        &self,
    ) -> impl ExactSizeIterator<Item = (DefinedFuncIndex, &[u8])> + '_ {
        self.funcs
            .keys()
            .map(move |i| (i, self.array_to_wasm_trampoline(i).unwrap()))
    }

Versions and Environment

Wasmtime version or commit: 9.0.0

Operating system: Linux

Architecture: x64

Extra Info

This panic didn't happen on v8.0.1.

Likely caused by either these PRs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions