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

input bytes aren't valid utf-8 #342

Open
c-dvl opened this issue Aug 24, 2023 · 4 comments
Open

input bytes aren't valid utf-8 #342

c-dvl opened this issue Aug 24, 2023 · 4 comments

Comments

@c-dvl
Copy link

c-dvl commented Aug 24, 2023

Hi,

I'm trying to build a wasm with wasi-sdk but encounter the following error on runtime step:
failed to parse /home/celine/Documents/Rline/rline/examples/memory-limitation/target/test.wasm: input bytes aren't valid utf-8.

I don't have this error with emscripten compiler. As I have memory limit with this last I would like to try to compile it with wasi-sdk but this error appears.

Compiler command line
/home/celine/Téléchargements/wasi-sdk-20.0/bin/clang++ src/main.cpp -o test.wasm

Runtime command line
wasmtime test.wasm --invoke stress < input.json

Céline

@abrown
Copy link
Collaborator

abrown commented Aug 28, 2023

Thanks for the report. Would it be possible to provide the code to reproduce this?

@sunfishcode
Copy link
Member

@c-dvl Could you try running the file command on the wasm file, like this:

file /home/celine/Documents/Rline/rline/examples/memory-limitation/target/test.wasm

and posting the output here?

@c-dvl
Copy link
Author

c-dvl commented Aug 31, 2023

Hi,

@abrown :the cpp main file and the json one :
test.zip

@sunfishcode : file target/test.wasm
target/test.wasm: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=fd26e19b3e6379902de653665f1a71f8a20e6c15, for GNU/Linux 3.2.0, not stripped

@sbc100
Copy link
Member

sbc100 commented Sep 6, 2023

Looks like something went wrong with your building system. target/test.wasm is an x86_64 executable, and presumably it is supposed to be a wasm file?

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

4 participants