RESOLVED FIXED120033
Incorrect behavior on emscripten-compiled cube2hash
https://bugs.webkit.org/show_bug.cgi?id=120033
Summary Incorrect behavior on emscripten-compiled cube2hash
Alon Zakai
Reported 2013-08-19 16:10:30 PDT
Created attachment 209135 [details] cube2hash Attached is the cube2 hash function compiled from C using emscripten. In jsc it gives incorrect results, for example $ jsc src.cpp.o.js -- fleefl hash value: 2912ECE742D4821CD4B778CEBEACD081E97D3F4CBEACD081 $ d8 src.cpp.o.js -- fleefl hash value: 892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9 $ mozjs src.cpp.o.js fleefl hash value: 892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9 (i.e. jsc differs from v8 and sm) Sorry for the non-trivial size, almost all the emscripten test suite passes but for a few larger tests I am afraid, all the smaller ones do not fail.
Attachments
cube2hash (281.91 KB, text/plain)
2013-08-19 16:10 PDT, Alon Zakai
no flags
the patch (307.03 KB, patch)
2013-08-19 22:20 PDT, Filip Pizlo
mhahnenberg: review+
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (514.12 KB, application/zip)
2013-08-20 02:36 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (577.03 KB, application/zip)
2013-08-20 06:08 PDT, Build Bot
no flags
Oliver Hunt
Comment 1 2013-08-19 16:29:18 PDT
32bit error
Oliver Hunt
Comment 2 2013-08-19 16:40:13 PDT
Repros in 32-bit only: JSC_maximumFunctionForCallInlineCandidateInstructionCount=88 JSC_maximumFunctionForClosureCallInlineCandidateInstructionCount=0 JSC_maximumFunctionForConstructInlineCandidateInstructionCount=0 JSC_maximumInliningDepth=2 JSC_bytecodeRangeToDFGCompile=9128:9128 DYLD_FRAMEWORK_PATH=WebKitBuild/Debug WebKitBuild//Debug/jsc src.cpp.o.js -- fleefl
Oliver Hunt
Comment 3 2013-08-19 16:45:40 PDT
Ooh, and 64-bit if you disable the concurrent jit
Radar WebKit Bug Importer
Comment 4 2013-08-19 16:47:06 PDT
Filip Pizlo
Comment 5 2013-08-19 21:30:02 PDT
(In reply to comment #0) > Created an attachment (id=209135) [details] > cube2hash > > Attached is the cube2 hash function compiled from C using emscripten. In jsc it gives incorrect results, for example > > $ jsc src.cpp.o.js -- fleefl > hash value: 2912ECE742D4821CD4B778CEBEACD081E97D3F4CBEACD081 > $ d8 src.cpp.o.js -- fleefl > hash value: 892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9 > $ mozjs src.cpp.o.js fleefl > hash value: 892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9 > > (i.e. jsc differs from v8 and sm) > > Sorry for the non-trivial size, almost all the emscripten test suite passes but for a few larger tests I am afraid, all the smaller ones do not fail. Fascinating. Thanks for the bug report, I'll look.
Filip Pizlo
Comment 6 2013-08-19 21:55:08 PDT
This is an easy bug. CSE for GetClosureVar is borked.
Filip Pizlo
Comment 7 2013-08-19 22:20:36 PDT
Created attachment 209157 [details] the patch
Build Bot
Comment 8 2013-08-20 02:36:45 PDT
Comment on attachment 209157 [details] the patch Attachment 209157 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1510809 New failing tests: fast/js/dfg-get-closure-var-put-closure-var-interference.html fast/js/regress/emscripten-cube2hash.html
Build Bot
Comment 9 2013-08-20 02:36:47 PDT
Created attachment 209173 [details] Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Build Bot
Comment 10 2013-08-20 06:08:00 PDT
Comment on attachment 209157 [details] the patch Attachment 209157 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1518468 New failing tests: fast/js/dfg-get-closure-var-put-closure-var-interference.html fast/js/regress/emscripten-cube2hash.html
Build Bot
Comment 11 2013-08-20 06:08:03 PDT
Created attachment 209189 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Mark Hahnenberg
Comment 12 2013-08-20 08:30:10 PDT
Comment on attachment 209157 [details] the patch r=me
Filip Pizlo
Comment 13 2013-08-20 11:21:18 PDT
Tim Horton
Comment 15 2013-08-20 13:44:23 PDT
(In reply to comment #14) > The test (fast/js/regress/emscripten-cube2hash) added by this seems to be failing on the ML testers, with console.logs and exceptions and stuff: I filed https://bugs.webkit.org/show_bug.cgi?id=120083
Note You need to log in before you can comment on or make changes to this bug.