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

Invalid trap on CoreMark SIMD with LLVM backend #969

Closed
kripken opened this issue Nov 14, 2019 · 1 comment · Fixed by #971
Closed

Invalid trap on CoreMark SIMD with LLVM backend #969

kripken opened this issue Nov 14, 2019 · 1 comment · Fixed by #971
Assignees
Labels
bug Something isn't working

Comments

@kripken
Copy link

kripken commented Nov 14, 2019

$ ~/.wasmer/bin/wasmer run --backend=llvm --enable-simd coremark-simd.wasm 
Error: wasm trap occured: memory out-of-bounds access

This problem doesn't happen in a build of the benchmark without SIMD.

I believe the file is valid, as the same wasm file runs ok in WAVM (running ok means it runs for 10-20 seconds and then prints some benchmark results). Also it is built with emscripten, and js+wasm versions (not standalone/wasi like this file) work with SIMD in V8, so the emitted SIMD is correct as far as I know.

coremark-simd.wasm.zip

@kripken kripken added the bug Something isn't working label Nov 14, 2019
@nlewycky nlewycky self-assigned this Nov 15, 2019
@syrusakbary
Copy link
Member

Thanks for the report Alon! We are investigating it 🙂

nlewycky added a commit that referenced this issue Nov 15, 2019
LLVM's instcombine will attempt to bump the alignment when it can prove that it's safe to do so.

Fixes #969.
bors bot added a commit that referenced this issue Nov 15, 2019
971: When accessing memory, use byte aligned accesses. r=nlewycky a=nlewycky

# Description
When accessing memory, use byte aligned accesses.

LLVM's instcombine will attempt to bump the alignment when it can prove that it's safe to do so.

Fixes #969.

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <[email protected]>
@bors bors bot closed this as completed in ebe8da7 Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants