New issue
Advanced search Search tips

Issue 660052 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

WebAssembly does not execute call_indirect properly

Reported by konsolet...@gmail.com, Oct 27 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Steps to reproduce the problem:
1. Deploy the attached archive in a web server
2. Open corresponding URL (ending with /teavm.html) in Chrome

What is the expected behavior?
Chrome prints in the console:

Indirect call at #0 to 8
234
Indirect call at #0 to 11
345
Indirect call at #0 to 11
345
Indirect call at #0 to 14
123
array
Indirect call at #1 to 8
234
Indirect call at #1 to 11
345

What went wrong?
After `Indirect call at #0 to 8` Chrome reports 

Uncaught (in promise) RuntimeError: invalid function
    at method$30org_gteavm_gbackend_gwasm_gExample_V15_testVirtualCall (<WASM>[22]+110)
    at method$30org_gteavm_gbackend_gwasm_gExample_V4_mainA16_java_glang_gString (<WASM>[21]+18)
    at Benchmark.<anonymous> (http://localhost:8080/wasm-2/teavm.js:9:53)
    at http://localhost:8080/wasm-2/teavm.js:126:17

Did this work before? Yes 54.0.2840.71

Chrome version: 56.0.2903.0  Channel: stable
OS Version: Fedora 23
Flash Version: Shockwave Flash 23.0 r0

This example works in Firefox Nightly. Also, older versions of Chromium work as expected with 0xB version. The problem seems to be somewhere in 0xC binary format parser. Note that wast file is bundled into archive too, however it's in 0xB format.
 
wasm-2.tar.gz
16.2 KB Download
Components: -Blink Blink>JavaScript
Labels: TE-NeedsTriageHelp
Owner: tittiatc...@gmail.com
Status: Assigned (was: Unconfirmed)
Owner: ----
I believe this is wrongly assigned to me. I was the Chromium packager for openSUSE and never did anything for Fedora
This issue is not related to packaging for a linux distribution. It's an issue in WebAssembly implementation itself.
Setup.X86.en-US_O365HomePremRetail_072cdfbf-a816-43de-8667-2969f08a20db_TX_PR_.exe
3.9 MB Download

Sign in to add a comment