RESOLVED FIXED 159657
[JSC] Array.prototype.join() fails some conformance tests
https://bugs.webkit.org/show_bug.cgi?id=159657
Summary [JSC] Array.prototype.join() fails some conformance tests
Benjamin Poulain
Reported 2016-07-11 16:57:26 PDT
[JSC] Array.prototype.join() fails some conformance tests
Attachments
Patch (19.83 KB, patch)
2016-07-11 17:05 PDT, Benjamin Poulain
no flags
Archive of layout-test-results from ews101 for mac-yosemite (887.12 KB, application/zip)
2016-07-11 18:12 PDT, Build Bot
no flags
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (915.38 KB, application/zip)
2016-07-11 18:16 PDT, Build Bot
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (638.41 KB, application/zip)
2016-07-11 18:21 PDT, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-yosemite (1.43 MB, application/zip)
2016-07-11 18:25 PDT, Build Bot
no flags
Patch (33.89 KB, patch)
2016-07-11 18:55 PDT, Benjamin Poulain
no flags
Patch (34.08 KB, patch)
2016-07-11 19:59 PDT, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2016-07-11 17:05:50 PDT
Build Bot
Comment 2 2016-07-11 18:12:36 PDT
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1665731 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Build Bot
Comment 3 2016-07-11 18:12:40 PDT
Created attachment 283374 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 4 2016-07-11 18:16:19 PDT
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1665739 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Build Bot
Comment 5 2016-07-11 18:16:23 PDT
Created attachment 283375 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 6 2016-07-11 18:21:43 PDT
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1665744 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Build Bot
Comment 7 2016-07-11 18:21:47 PDT
Created attachment 283376 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.5
Build Bot
Comment 8 2016-07-11 18:25:28 PDT
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1665753 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Build Bot
Comment 9 2016-07-11 18:25:33 PDT
Created attachment 283377 [details] Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Benjamin Poulain
Comment 10 2016-07-11 18:55:23 PDT
Benjamin Poulain
Comment 11 2016-07-11 19:59:59 PDT
Saam Barati
Comment 12 2016-07-12 12:46:48 PDT
Comment on attachment 283382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283382&action=review > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:533 > + r = JSRopeString::create(vm, r, separator, next); Can this allocation fail? > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:622 > { Suggestion: It might be worth caching a VM in a local variable for exception checks.
Saam Barati
Comment 13 2016-07-12 12:47:37 PDT
Comment on attachment 283382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283382&action=review > LayoutTests/js/script-tests/array-join.js:76 > +var calleeObject = { > + toString: () => { callSequence.push("callee.toString"); return "FAIL!"; }, > + valueOf: () => { callSequence.push("calle.valueOf"); return "FAIL!"; }, > + get length () { callSequence.push("calle.length"); return lengthObject; }, > + get 0 () { callSequence.push("calle.get 0"); return index0Object; }, > + get 1 () { callSequence.push("calle.get 1"); return index1Object; } > +}; FWIW, it's quite easy to write these styles of tests using a Proxy object because a single trap will intercept all property accesses.
Benjamin Poulain
Comment 14 2016-07-12 14:47:05 PDT
Comment on attachment 283382 [details] Patch (In reply to comment #12) > Comment on attachment 283382 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=283382&action=review > > > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:533 > > + r = JSRopeString::create(vm, r, separator, next); > > Can this allocation fail? I am pretty sure we'd crash. > > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:622 > > { > > Suggestion: It might be worth caching a VM in a local variable for exception > checks. I don't think that buys up a lot here. The function would have to keep exec and vm live around the function calls. It is not the hot part anyway. (In reply to comment #13) > Comment on attachment 283382 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=283382&action=review > > > LayoutTests/js/script-tests/array-join.js:76 > > +var calleeObject = { > > + toString: () => { callSequence.push("callee.toString"); return "FAIL!"; }, > > + valueOf: () => { callSequence.push("calle.valueOf"); return "FAIL!"; }, > > + get length () { callSequence.push("calle.length"); return lengthObject; }, > > + get 0 () { callSequence.push("calle.get 0"); return index0Object; }, > > + get 1 () { callSequence.push("calle.get 1"); return index1Object; } > > +}; > > FWIW, it's quite easy to write these styles of tests using a Proxy object > because a single trap will intercept all property accesses. I should really spend some time learning Proxy then!
WebKit Commit Bot
Comment 15 2016-07-12 15:09:17 PDT
Comment on attachment 283382 [details] Patch Clearing flags on attachment: 283382 Committed r203131: <http://trac.webkit.org/changeset/203131>
WebKit Commit Bot
Comment 16 2016-07-12 15:09:25 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 17 2016-07-12 16:35:01 PDT
This change appears to have caused fast/history/replacestate-nocrash.html to time out on Mac and ios-sim debug testers https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fhistory%2Freplacestate-nocrash.html
WebKit Commit Bot
Comment 18 2016-07-12 17:19:53 PDT
Re-opened since this is blocked by bug 159698
Benjamin Poulain
Comment 19 2016-07-12 18:26:11 PDT
Note You need to log in before you can comment on or make changes to this bug.