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

Does the LLVM Compiler Support bulk_memory? #2252

Closed
jozanza opened this issue Apr 23, 2021 · 3 comments · Fixed by #2296
Closed

Does the LLVM Compiler Support bulk_memory? #2252

jozanza opened this issue Apr 23, 2021 · 3 comments · Fixed by #2296
Labels
❓ question I've a question!

Comments

@jozanza
Copy link

jozanza commented Apr 23, 2021

Summary

I'm using the llvm compiler along with the native engine, and bulk_memory instructions like memory.copy seem to cause panics.

Additional details

It looks like certain wasm bulk memory operators, such as MemoryCopy, are not implemented by compiler-llvm. In cases when certain instructions are run (memory.copy, memory.fill, etc), the wasm execution will crash, hitting this default case.

My wasmer dependency in Cargo.toml looks like this:

wasmer = { version = "1.0.2", default-features = false, features = ["wat", "default-native", "default-llvm" ] }
@jozanza jozanza added the ❓ question I've a question! label Apr 23, 2021
@VictorBulba
Copy link

+1

My error messages:
Codegen("Operator MemoryCopy { src: 0, dst: 0 } unimplemented")
Codegen("Operator MemoryFill { mem: 0 } unimplemented")

@nlewycky
Copy link
Contributor

We support TableCopy, TableInit and ElemDrop because those are used by the reference types proposal (as well as TableFill and TableGrow which aren't in the bulk memory proposal) but not the other operators.

@jozanza
Copy link
Author

jozanza commented Apr 27, 2021

Thanks for the clarification @nlewycky! Is there any plan to add those extra couple memory ops? It looks like bulk_memory is a finished proposal at this point and is making its way into browsers, so it'd be really nice for compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question I've a question!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants