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.
32bit error
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
Ooh, and 64-bit if you disable the concurrent jit
<rdar://problem/14779298>
(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.
This is an easy bug. CSE for GetClosureVar is borked.
Created attachment 209157 [details] the patch
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
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
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
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
Comment on attachment 209157 [details] the patch r=me
Landed in http://trac.webkit.org/changeset/154344
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: http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK2%20(Tests)/r154351%20(10956)/fast/js/regress/emscripten-cube2hash-pretty-diff.html http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK1%20(Tests)/r154351%20(12124)/fast/js/regress/emscripten-cube2hash-pretty-diff.html
(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