Issue 6881 in v8: Warning Chrome : Invalid asm.js: Unexpected token

190 views
Skip to first unread message

daffra.c… via monorail

unread,
Oct 3, 2017, 10:57:52 AM10/3/17
to v8-re...@googlegroups.com
Status: Untriaged
Owner: ----

New issue 6881 by daffra.c...@gmail.com: Warning Chrome : Invalid asm.js: Unexpected token
https://bugs.chromium.org/p/v8/issues/detail?id=6881

Version: 61.0.3163.100 (Build ufficiale) (a 64 bit)
OS: windows 10 pro
Architecture: x64

What steps will reproduce the problem?

this file was generated by Emscripten :
I've compiled multiple sources without rewriting this warning,
but in my file, Chrome returns a warning, everything works anyway
OK in Firefox and Edge.

chrome 61 : Emscripten 1.37.21 : window 10 pro

while((ptr|0) <= (block_aligned_end|0)) {
HEAP32[((ptr)>>2)]=value4; <-- Warning
HEAP32[(((ptr)+(4))>>2)]=value4;
HEAP32[(((ptr)+(8))>>2)]=value4;
HEAP32[(((ptr)+(12))>>2)]=value4;
HEAP32[(((ptr)+(16))>>2)]=value4;
HEAP32[(((ptr)+(20))>>2)]=value4;
HEAP32[(((ptr)+(24))>>2)]=value4;
HEAP32[(((ptr)+(28))>>2)]=value4;
HEAP32[(((ptr)+(32))>>2)]=value4;
HEAP32[(((ptr)+(36))>>2)]=value4;
HEAP32[(((ptr)+(40))>>2)]=value4;
HEAP32[(((ptr)+(44))>>2)]=value4;
HEAP32[(((ptr)+(48))>>2)]=value4;
HEAP32[(((ptr)+(52))>>2)]=value4;
HEAP32[(((ptr)+(56))>>2)]=value4;
HEAP32[(((ptr)+(60))>>2)]=value4;
ptr = (ptr + 64)|0;
}

What is the expected output?

no warning

What do you see instead?

warning in this line
HEAP32[((ptr)>>2)]=value4; <-- Warning

Please use labels and text to provide additional information.

i'm doing other tests, it has not happened anymore



Attachments:
warning.jpg 100 KB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

cleme… via monorail

unread,
Oct 4, 2017, 5:06:43 AM10/4/17
to v8-re...@googlegroups.com
Updates:
Cc: clem...@chromium.org

Comment #1 on issue 6881 by clem...@chromium.org: Warning Chrome : Invalid asm.js: Unexpected token
https://bugs.chromium.org/p/v8/issues/detail?id=6881#c1

This is a pure UI problem, right? The code is being executed correctly?
Which warning is being shown?

cleme… via monorail

unread,
Oct 4, 2017, 5:18:19 AM10/4/17
to v8-re...@googlegroups.com
Updates:
Labels: Hotlist-asm Priority-1
Owner: mstar...@chromium.org
Status: Assigned

Comment #2 on issue 6881 by clem...@chromium.org: Warning Chrome : Invalid asm.js: Unexpected token
https://bugs.chromium.org/p/v8/issues/detail?id=6881#c2

Oh, just found the error message in the title. So it's a parser problem.
Michi, can you take a look? Parentheses should be ok here, no?

Reproducer:

function Module(stdlib, foreign, heap) {
"use asm";
var MEM32 = new stdlib.Int32Array(heap);
function load(i) {
i = i|0;
return MEM32[((i)>>2)] | 0;
}
return { load: load };
}

var m = Module(this, {}, new ArrayBuffer(4096));

m.load(0);


Gives:
[$]› out/Optdebug/d8 test.js --trace-asm-parser
[asm.js failure: Expected shift of word size, token: ']', see: ../../src/asmjs/asm-parser.cc:2405]
test.js:10: Invalid asm.js: Expected shift of word size

daffra.c… via monorail

unread,
Oct 4, 2017, 5:26:31 AM10/4/17
to v8-re...@googlegroups.com

Comment #3 on issue 6881 by daffra.c...@gmail.com: Warning Chrome : Invalid asm.js: Unexpected token
https://bugs.chromium.org/p/v8/issues/detail?id=6881#c3

yes, all work without problems, chrome gives me warning only.

cleme… via monorail

unread,
Apr 13, 2022, 3:12:00 PM4/13/22
to v8-re...@googlegroups.com
Updates:
Status: Archived

Comment #7 on issue 6881 by clem...@chromium.org: Warning Chrome : Invalid asm.js: Unexpected token
https://bugs.chromium.org/p/v8/issues/detail?id=6881#c7

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages