[llvm-bugs] [Bug 50413] New: Polybench mm benchmarks with Polly and Wasm backend lead to runtime error

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 20 00:49:16 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50413

            Bug ID: 50413
           Summary: Polybench mm benchmarks with Polly and Wasm backend
                    lead to runtime error
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Other
          Assignee: polly-dev at googlegroups.com
          Reporter: manuel.selva at inria.fr
                CC: llvm-bugs at lists.llvm.org

I am compiling the polybench to WebAssembly using clang. Activating Polly in
this compilation path lead to a runtime error when executing the generated wasm
code for the 2mm, 3mm and gemm benchmarks.

Here is the error, basically the code tries to access memory out of what has
been allocated :

```
╰─ wasmtime 2mm-wasm_polly 
Error: failed to run main module `2mm-wasm-polly`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0:  0x3ec - <unknown>!polybench_alloc_data
           1:  0x491 - <unknown>!main
           2: 0x456a - <unknown>!__main_void
           3: 0x44e2 - <unknown>!__original_main
           4:  0x21a - <unknown>!_start
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to
display more information
```

Note that the error occurs with all the WebAssembly runtimes that we tried.

Maybe the issue is not on the Polly side, but in the WebAssembly backend one. I
didn't found a way to attach this request also to another product so that the
people from the backend could be notified too. Please let me know how to do
that.

Finally, here are some information to reproduce the bug. Please let me know if
I can provide anything else that maybe useful for you to identify what is going
on.

llvm commit : 1fbb484ea45f85740b7450b175096e5fcff6ecd9

compilation command (include and link options omitted) : clang -O3 -mllvm
-polly -2mm.c -DLARGE_DATASET -DPOLYBENCH_TIME --target=wasm32-wasi -o
2mm-wasm-polly

Thank you for the support,

--
Manu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210520/19d9b982/attachment.html>


More information about the llvm-bugs mailing list