Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iwasm: WASM module load failed: type mismatch: expect (ref null ht) but got other1 unknown type #3411

Open
bashor opened this issue May 9, 2024 · 5 comments

Comments

@bashor
Copy link

bashor commented May 9, 2024

Steps to reproduce

  1. Unpack zip kotlin-wasm-wasi-example-wasm-wasi-dev.wasm.zip

  2. Build iwasm with the following command

 cmake .. -DWAMR_BUILD_GC=1 -DWAMR_BUILD_BULK_MEMORY=1 -DWAMR_BUILD_EXCE_HANDLING=1 -DWAMR_BUILD_TAIL_CALL=1 -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 -DWAMR_BUILD_EXCE_HANDLING=0 && make
  1. Run ./iwasm kotlin-wasm-wasi-example-wasm-wasi-dev.wasm

Expected behavior

It should print something like:

Hello from Kotlin via WASI
Current 'realtime' timestamp is: 1715281633864118000
Current 'monotonic' timestamp is: 210424654558083

Actual behavior

It prints:

WASM module load failed: type mismatch: expect (ref null ht) but got other1 unknown type
@TianlongLiang
Copy link
Contributor

Hi, would you mind telling me which toolchain you are using? I wasn't aware that Kotlin has standalone support for wasm, I would love to give it a try if it's publicly accessible

@bashor
Copy link
Author

bashor commented May 10, 2024

@TianlongLiang Hi! Kotlin Multiplatform toolchain supports wasm out of the box. Check out https://kotl.in/wasm or https://kotl.in/wasm-examples.

@bashor
Copy link
Author

bashor commented May 10, 2024

I'm working on Kotlin/Wasm (with other folks), so feel free to reach out if you have any questions.

@TianlongLiang
Copy link
Contributor

Thanks, I will definitely check it out!

@wenyongh
Copy link
Contributor

Please try #3447.

wenyongh added a commit that referenced this issue May 21, 2024
…y new (#3447)

Only support interpreter now, and fix some issues found in wasm loader.

This PR fixes issue #3410 and #3411.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants