Skip to content

WASM module load failed: unknown table 128 #4744

@Please-just-dont

Description

@Please-just-dont

There is an issue when calling:

wasm_runtime_load

I get the error:

[14:31:14:118 - 7B4343494780]: Load import section success.

[14:31:14:119 - 7B4343494780]: Load function section success.

[14:31:14:119 - 7B4343494780]: Load table section success.

[14:31:14:119 - 7B4343494780]: Load memory section success.

[14:31:14:119 - 7B4343494780]: Load global section success.

[14:31:14:119 - 7B4343494780]: Load export section success.

[14:31:14:119 - 7B4343494780]: Load table segment section success.

[14:31:14:119 - 7B4343494780]: Load code segment section success.

[14:31:14:119 - 7B4343494780]: Load data segment section success.

[14:31:14:120 - 7B4343494780]: wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c, line 1498, WASM module load failed
Load wasm module failed. error: WASM module load failed: unknown table 128

Describe the bug

Version
Latest source code cloned or downloaded from the main repo.

To Reproduce
Link to minimal example (commented, build with CMake)

The code I tried to compile:

#include <stdio.h>

__attribute__((export_name("start_benchmark")))
float
start_benchmark()
{
    // IF printf OR MANY OTHER STANDARD LIBRARY FUNCTIONS ARE CALLED THE MODULE FAILS TO LOAD WITH
    // // wasm_runtime_load FAILS AND GIVES wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c, line 1498, WASM module load failed
    //Load wasm module failed. error: WASM module load failed: unknown table 128
    printf("Hello from WASM Module!!!");
}

The link to the minimal example repo contains source and a compiled WebAssembly code.

Note
This error happens when downloading the latest source code from the repo. The source code from the last release (2 weeks ago) doesn't have this problem. This error only happens when loading the module with the source code from the repo, not from the Release. I'm wondering why.

Desktop (please complete the following information):
Arch= x86_64
Platforms= Both Linux and Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions