Skip to content

AOT produced from latest wasmedge-quickjs on AMD64 Linux fails to load with “AOT OS type unmatched / malformed section id” #147

@StarsHu

Description

@StarsHu

When building wasmedge-quickjs from the latest source on a native AMD64 Linux environment and generating the AOT version using wasmedgec, the resulting AOT file cannot be executed by WasmEdge.
Instead, WasmEdge reports that the AOT section is invalid or incompatible.

Environment

Component Version / Info
CPU Architecture x86_64 / amd64
OS Debian 11 & 12 & 13
WasmEdge Version 0.14.0 (manylinux2014 and manylinux2_28)
wasmedge-quickjs latest main branch
Rust Version rustc 1.91.1
Cargo Version cargo 1.91.1
Build Target wasm32-wasip1
AOT Tool wasmedgec from WasmEdge 0.14.0
Execution Runtime wasmedge from WasmEdge 0.14.0

Steps to Reproduce

Using debian in docker for example, it will reproduce error too.

docker run -it --platform linux/amd64 debian:12 /bin/bash

Inside the docker

apt-get update && apt-get install -y build-essential curl git wget python3 clang

curl https://sh.rustup.rs -sSf | sh -s -- -y
source ~/.cargo/env
# using wasmedge v0.14.0
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.14.0
rustup target add wasm32-wasip1
mkdir -p /app && cd /app
# using the latest main branch
git clone https://github.com/second-state/wasmedge-quickjs.git
cd /app/wasmedge-quickjs
cargo build --target wasm32-wasip1 --release

wasmedgec target/wasm32-wasip1/release/wasmedge_quickjs.wasm wasmedge_quickjs_aot.wasm

wasmedge wasmedge_quickjs_aot.wasm

error message

[2025-11-26 10:44:40.955] [error]     AOT section -- number of codes not matching:6342 6294, use interpreter mode instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions