RESOLVED FIXED Bug 163986
JSC should support SharedArrayBuffer
https://bugs.webkit.org/show_bug.cgi?id=163986
Summary JSC should support SharedArrayBuffer
Filip Pizlo
Reported 2016-10-25 14:28:46 PDT
Patch forthcoming.
Attachments
it begins (8.19 KB, patch)
2016-10-25 14:29 PDT, Filip Pizlo
no flags
getting closer (22.98 KB, patch)
2016-10-25 16:09 PDT, Filip Pizlo
no flags
more (31.49 KB, patch)
2016-10-25 21:37 PDT, Filip Pizlo
no flags
more (66.48 KB, patch)
2016-10-26 12:54 PDT, Filip Pizlo
no flags
a bit more (68.01 KB, patch)
2016-10-26 22:40 PDT, Filip Pizlo
no flags
more (78.52 KB, patch)
2016-10-27 08:57 PDT, Filip Pizlo
no flags
rebased patch (78.75 KB, patch)
2016-10-27 09:44 PDT, Filip Pizlo
no flags
more (96.30 KB, patch)
2016-10-27 18:34 PDT, Filip Pizlo
no flags
it's starting to compile (100.53 KB, patch)
2016-10-27 21:32 PDT, Filip Pizlo
no flags
closer to compiling (110.86 KB, patch)
2016-10-28 09:34 PDT, Filip Pizlo
no flags
jsc compiles (112.41 KB, patch)
2016-10-28 10:19 PDT, Filip Pizlo
no flags
making the DOM happy (120.12 KB, patch)
2016-10-28 11:54 PDT, Filip Pizlo
no flags
working through more DOM uses of typed arrays (127.21 KB, patch)
2016-10-28 12:50 PDT, Filip Pizlo
no flags
more of the DOM compiles (128.63 KB, patch)
2016-10-28 13:24 PDT, Filip Pizlo
no flags
more of the DOM compiles (137.91 KB, patch)
2016-10-28 21:14 PDT, Filip Pizlo
no flags
the DOM compiles (139.46 KB, patch)
2016-10-29 11:13 PDT, Filip Pizlo
no flags
it all builds (143.36 KB, patch)
2016-10-29 12:10 PDT, Filip Pizlo
no flags
rebased patch (140.12 KB, patch)
2016-10-29 12:24 PDT, Filip Pizlo
no flags
more fixes (140.88 KB, patch)
2016-10-29 13:55 PDT, Filip Pizlo
no flags
it seems to work (185.85 KB, patch)
2016-10-29 20:52 PDT, Filip Pizlo
no flags
rebased patch (185.83 KB, patch)
2016-10-29 20:56 PDT, Filip Pizlo
no flags
better changelog (184.79 KB, patch)
2016-10-29 21:12 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews103 for mac-yosemite (1021.14 KB, application/zip)
2016-10-29 22:17 PDT, Build Bot
no flags
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (931.98 KB, application/zip)
2016-10-29 22:18 PDT, Build Bot
no flags
Archive of layout-test-results from ews117 for mac-yosemite (1009.45 KB, application/zip)
2016-10-29 22:21 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (829.32 KB, application/zip)
2016-10-29 22:31 PDT, Build Bot
no flags
some fixes (184.77 KB, patch)
2016-10-30 10:30 PDT, Filip Pizlo
no flags
rebased (184.71 KB, patch)
2016-10-30 10:40 PDT, Filip Pizlo
no flags
fix gcc build (184.77 KB, patch)
2016-10-30 10:46 PDT, Filip Pizlo
no flags
the patch (184.94 KB, patch)
2016-10-30 10:50 PDT, Filip Pizlo
no flags
the patch (185.00 KB, patch)
2016-10-30 10:59 PDT, Filip Pizlo
no flags
the patch (184.97 KB, patch)
2016-10-30 11:09 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews102 for mac-yosemite (1.12 MB, application/zip)
2016-10-30 12:30 PDT, Build Bot
no flags
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.12 MB, application/zip)
2016-10-30 12:33 PDT, Build Bot
no flags
Archive of layout-test-results from ews113 for mac-yosemite (1.93 MB, application/zip)
2016-10-30 12:44 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (19.84 MB, application/zip)
2016-10-30 12:47 PDT, Build Bot
no flags
the patch (185.71 KB, patch)
2016-10-30 22:09 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews103 for mac-yosemite (914.18 KB, application/zip)
2016-10-30 23:28 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (1.03 MB, application/zip)
2016-10-30 23:34 PDT, Build Bot
no flags
Archive of layout-test-results from ews113 for mac-yosemite (1.58 MB, application/zip)
2016-10-30 23:35 PDT, Build Bot
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (deleted)
2016-10-30 23:48 PDT, Build Bot
no flags
the patch (187.42 KB, patch)
2016-10-31 08:52 PDT, Filip Pizlo
no flags
the patch (187.38 KB, patch)
2016-10-31 09:20 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (1.41 MB, application/zip)
2016-10-31 10:49 PDT, Build Bot
no flags
more tests WIP (196.86 KB, patch)
2016-10-31 10:54 PDT, Filip Pizlo
no flags
the patch (202.54 KB, patch)
2016-10-31 13:21 PDT, Filip Pizlo
no flags
the patch (203.90 KB, patch)
2016-10-31 13:24 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (1.33 MB, application/zip)
2016-10-31 15:03 PDT, Build Bot
no flags
the patch (206.70 KB, patch)
2016-10-31 15:46 PDT, Filip Pizlo
keith_miller: review+
Filip Pizlo
Comment 1 2016-10-25 14:29:33 PDT
Created attachment 292820 [details] it begins
Filip Pizlo
Comment 2 2016-10-25 14:29:50 PDT
Comment on attachment 292820 [details] it begins It's nowhere near ready for review.
WebKit Commit Bot
Comment 3 2016-10-25 14:31:57 PDT
Attachment 292820 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:36: Missing space inside { }. [whitespace/braces] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 4 2016-10-25 16:09:09 PDT
Created attachment 292841 [details] getting closer
Filip Pizlo
Comment 5 2016-10-25 16:18:33 PDT
Relevant: https://github.com/tc39/ecmascript_sharedmem/issues/38#issuecomment-163048837 I think that we want to make it harder to unwrap an ArrayBuffer if you haven't made a statement about whether you're happy sharing.
Filip Pizlo
Comment 6 2016-10-25 21:37:27 PDT
Filip Pizlo
Comment 7 2016-10-26 12:54:00 PDT
Filip Pizlo
Comment 8 2016-10-26 22:40:51 PDT
Created attachment 292994 [details] a bit more
Filip Pizlo
Comment 9 2016-10-27 08:57:35 PDT
Created attachment 293023 [details] more I'm renaming all of the functions that give native code access to a typed array's guts. For each toBlahTypedArray()/toArrayBuffer() function, we will now have two: toUnsharedBlah() -> same as the old toBlah() but asserts that the underlying buffer is unshared, or in the case of versions that dynamic cast, returns zero if the underlying buffer is unshared. toPossiblySharedBlah() -> same as the old toBlah() but may return something that has memory that is aliased with another thread.
Filip Pizlo
Comment 10 2016-10-27 09:44:48 PDT
Created attachment 293028 [details] rebased patch
Filip Pizlo
Comment 11 2016-10-27 18:34:54 PDT
Filip Pizlo
Comment 12 2016-10-27 21:32:13 PDT
Created attachment 293113 [details] it's starting to compile
Filip Pizlo
Comment 13 2016-10-28 09:34:52 PDT
Created attachment 293165 [details] closer to compiling
Filip Pizlo
Comment 14 2016-10-28 10:19:07 PDT
Created attachment 293172 [details] jsc compiles
Filip Pizlo
Comment 15 2016-10-28 11:54:00 PDT
Created attachment 293181 [details] making the DOM happy
Filip Pizlo
Comment 16 2016-10-28 12:50:26 PDT
Created attachment 293188 [details] working through more DOM uses of typed arrays
Filip Pizlo
Comment 17 2016-10-28 13:24:21 PDT
Created attachment 293195 [details] more of the DOM compiles
Filip Pizlo
Comment 18 2016-10-28 21:14:20 PDT
Created attachment 293273 [details] more of the DOM compiles
Filip Pizlo
Comment 19 2016-10-29 11:13:43 PDT
Created attachment 293299 [details] the DOM compiles
Filip Pizlo
Comment 20 2016-10-29 12:10:40 PDT
Created attachment 293307 [details] it all builds It builds and SharedArrayBuffer is behind a runtime flag. I haven't tested it yet.
Filip Pizlo
Comment 21 2016-10-29 12:24:38 PDT
Created attachment 293309 [details] rebased patch
WebKit Commit Bot
Comment 22 2016-10-29 12:27:00 PDT
Attachment 293309 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 5 in 69 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 23 2016-10-29 13:55:22 PDT
Created attachment 293311 [details] more fixes
WebKit Commit Bot
Comment 24 2016-10-29 13:58:05 PDT
Attachment 293311 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 5 in 70 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 25 2016-10-29 20:52:33 PDT
Created attachment 293324 [details] it seems to work
Filip Pizlo
Comment 26 2016-10-29 20:56:47 PDT
Created attachment 293325 [details] rebased patch
WebKit Commit Bot
Comment 27 2016-10-29 20:58:53 PDT
Attachment 293325 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:100: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 28 2016-10-29 21:12:45 PDT
Created attachment 293326 [details] better changelog
WebKit Commit Bot
Comment 29 2016-10-29 21:14:11 PDT
Attachment 293326 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:100: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 30 2016-10-29 22:17:06 PDT
Comment on attachment 293326 [details] better changelog Attachment 293326 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2403208 Number of test failures exceeded the failure limit.
Build Bot
Comment 31 2016-10-29 22:17:10 PDT
Created attachment 293329 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 32 2016-10-29 22:18:54 PDT
Comment on attachment 293326 [details] better changelog Attachment 293326 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2403207 Number of test failures exceeded the failure limit.
Build Bot
Comment 33 2016-10-29 22:18:58 PDT
Created attachment 293330 [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 34 2016-10-29 22:21:07 PDT
Comment on attachment 293326 [details] better changelog Attachment 293326 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2403205 Number of test failures exceeded the failure limit.
Build Bot
Comment 35 2016-10-29 22:21:11 PDT
Created attachment 293331 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 36 2016-10-29 22:31:33 PDT
Comment on attachment 293326 [details] better changelog Attachment 293326 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2403217 Number of test failures exceeded the failure limit.
Build Bot
Comment 37 2016-10-29 22:31:37 PDT
Created attachment 293333 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Filip Pizlo
Comment 38 2016-10-30 09:18:31 PDT
Ooops the crashes look like a missing null check.
Filip Pizlo
Comment 39 2016-10-30 10:30:41 PDT
Created attachment 293352 [details] some fixes toUnsharedArrayBufferView was missing a null check.
Filip Pizlo
Comment 40 2016-10-30 10:40:48 PDT
WebKit Commit Bot
Comment 41 2016-10-30 10:42:52 PDT
Attachment 293353 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 42 2016-10-30 10:46:04 PDT
Created attachment 293354 [details] fix gcc build
WebKit Commit Bot
Comment 43 2016-10-30 10:48:07 PDT
Attachment 293354 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 44 2016-10-30 10:50:01 PDT
Created attachment 293355 [details] the patch
WebKit Commit Bot
Comment 45 2016-10-30 10:51:32 PDT
Attachment 293355 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 46 2016-10-30 10:59:32 PDT
Created attachment 293356 [details] the patch
WebKit Commit Bot
Comment 47 2016-10-30 11:02:45 PDT
Attachment 293356 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 48 2016-10-30 11:09:19 PDT
Created attachment 293358 [details] the patch
WebKit Commit Bot
Comment 49 2016-10-30 11:11:28 PDT
Attachment 293358 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:184: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 50 2016-10-30 11:48:10 PDT
Looks like I messed up ArrayBuffer transfer for the non-shared case.
Build Bot
Comment 51 2016-10-30 12:30:03 PDT
Comment on attachment 293358 [details] the patch Attachment 293358 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2406561 New failing tests: js/typed-array-mutated-during-set.html workers/sab/simple.html fast/dom/Window/window-postmessage-args.html fast/canvas/webgl/arraybuffer-transfer-of-control.html js/dom/global-constructors-attributes-dedicated-worker.html js/dom/dfg-byteOffset-neuter.html
Build Bot
Comment 52 2016-10-30 12:30:07 PDT
Created attachment 293362 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 53 2016-10-30 12:33:08 PDT
Comment on attachment 293358 [details] the patch Attachment 293358 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2406562 New failing tests: js/dom/global-constructors-attributes.html workers/sab/simple.html js/dom/dfg-byteOffset-neuter.html fast/canvas/webgl/arraybuffer-transfer-of-control.html js/dom/global-constructors-attributes-dedicated-worker.html fast/dom/Window/window-postmessage-args.html js/typed-array-mutated-during-set.html
Build Bot
Comment 54 2016-10-30 12:33:13 PDT
Created attachment 293364 [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 55 2016-10-30 12:44:51 PDT
Comment on attachment 293358 [details] the patch Attachment 293358 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2406565 New failing tests: js/typed-array-mutated-during-set.html workers/sab/simple.html fast/dom/Window/window-postmessage-args.html fast/canvas/webgl/arraybuffer-transfer-of-control.html js/dom/global-constructors-attributes-dedicated-worker.html js/dom/dfg-byteOffset-neuter.html
Build Bot
Comment 56 2016-10-30 12:44:56 PDT
Created attachment 293366 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 57 2016-10-30 12:47:36 PDT
Comment on attachment 293358 [details] the patch Attachment 293358 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2406568 New failing tests: js/dom/dfg-byteOffset-neuter.html fast/dom/Window/window-postmessage-args.html js/dom/global-constructors-attributes-dedicated-worker.html js/typed-array-mutated-during-set.html workers/sab/simple.html
Build Bot
Comment 58 2016-10-30 12:47:41 PDT
Created attachment 293367 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Filip Pizlo
Comment 59 2016-10-30 18:29:48 PDT
I'm debugging the crashes. They are subtle. An array buffer view's vector goes null at some point, don't know why yet.
Filip Pizlo
Comment 60 2016-10-30 18:49:07 PDT
(In reply to comment #59) > I'm debugging the crashes. They are subtle. An array buffer view's vector > goes null at some point, don't know why yet. Found it. ArrayBuffer::transferTo() needs to clear() this. Failing to do so creates all manner of problems. Basically, the vector was supposed to be null because of neutering, but our logic for handling neutered array buffers wasn't working right because the ArrayBuffer itself had not been neutered (because the of the missing clear call).
Filip Pizlo
Comment 61 2016-10-30 22:09:57 PDT
Created attachment 293391 [details] the patch I fixed the crash in neutering.
WebKit Commit Bot
Comment 62 2016-10-30 22:12:27 PDT
Attachment 293391 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 93 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 63 2016-10-30 23:28:25 PDT
Comment on attachment 293391 [details] the patch Attachment 293391 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2409241 New failing tests: js/dom/global-constructors-attributes-dedicated-worker.html workers/sab/simple.html
Build Bot
Comment 64 2016-10-30 23:28:31 PDT
Created attachment 293392 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 65 2016-10-30 23:34:52 PDT
Comment on attachment 293391 [details] the patch Attachment 293391 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2409260 New failing tests: js/dom/global-constructors-attributes.html js/dom/global-constructors-attributes-dedicated-worker.html media/modern-media-controls/volume-support/volume-support-click.html workers/sab/simple.html
Build Bot
Comment 66 2016-10-30 23:34:57 PDT
Created attachment 293393 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 67 2016-10-30 23:35:09 PDT
Comment on attachment 293391 [details] the patch Attachment 293391 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2409254 New failing tests: js/dom/global-constructors-attributes-dedicated-worker.html workers/sab/simple.html
Build Bot
Comment 68 2016-10-30 23:35:15 PDT
Created attachment 293394 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 69 2016-10-30 23:48:01 PDT
Comment on attachment 293391 [details] the patch Attachment 293391 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2409276 New failing tests: js/dom/global-constructors-attributes-dedicated-worker.html workers/sab/simple.html
Build Bot
Comment 70 2016-10-30 23:48:06 PDT
Created attachment 293395 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Filip Pizlo
Comment 71 2016-10-31 08:52:45 PDT
Created attachment 293423 [details] the patch
WebKit Commit Bot
Comment 72 2016-10-31 08:56:05 PDT
Attachment 293423 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 95 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 73 2016-10-31 09:20:40 PDT
Created attachment 293426 [details] the patch
WebKit Commit Bot
Comment 74 2016-10-31 09:23:39 PDT
Attachment 293426 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 95 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 75 2016-10-31 10:49:19 PDT
Comment on attachment 293426 [details] the patch Attachment 293426 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2411984 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 76 2016-10-31 10:49:25 PDT
Created attachment 293432 [details] Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Filip Pizlo
Comment 77 2016-10-31 10:54:42 PDT
Created attachment 293434 [details] more tests WIP
Keith Miller
Comment 78 2016-10-31 10:56:25 PDT
Comment on attachment 293426 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=293426&action=review Some comments. Mostly looks good. I'll hold off on the final review until the tests are done though. > Source/JavaScriptCore/ChangeLog:20 > + There is also a Atomics object in global scope, which exposes sequentiall consistent atomic typo: a Atomcis => an Atomics. sequentiall => sequentially. > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:109 > + ASSERT(policy == DontInitialize); Is this assert really necessary? > Source/JavaScriptCore/runtime/ArrayBuffer.h:188 > + // FIXME: We probably want to scale this by the shared ref count or something. yikes, this seems unfortunate. > Source/JavaScriptCore/runtime/AtomicsObject.cpp:322 > + // FIXME: Stop using std::chrono. File a bug! :)
Filip Pizlo
Comment 79 2016-10-31 11:00:08 PDT
(In reply to comment #78) > Comment on attachment 293426 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=293426&action=review > > Some comments. Mostly looks good. I'll hold off on the final review until > the tests are done though. > > > Source/JavaScriptCore/ChangeLog:20 > > + There is also a Atomics object in global scope, which exposes sequentiall consistent atomic > > typo: a Atomcis => an Atomics. sequentiall => sequentially. Fixed. > > > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:109 > > + ASSERT(policy == DontInitialize); > > Is this assert really necessary? I think it was there before I moved that code from ArrayBuffer.h > > > Source/JavaScriptCore/runtime/ArrayBuffer.h:188 > > + // FIXME: We probably want to scale this by the shared ref count or something. > > yikes, this seems unfortunate. > > > Source/JavaScriptCore/runtime/AtomicsObject.cpp:322 > > + // FIXME: Stop using std::chrono. > > File a bug! :) I think we have one. I'll find it.
JF Bastien
Comment 80 2016-10-31 11:08:38 PDT
Comment on attachment 293426 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=293426&action=review > Source/JavaScriptCore/ChangeLog:20 > + There is also a Atomics object in global scope, which exposes sequentiall consistent atomic Typo "sequential" > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:95 > +{ Should this set `m_shared = nullptr;` at the beginning? Or assert on it? > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:101 > + m_data = nullptr; It seems like setting `m_sizeInBytes = 0;` on both failure paths would be conservatively good. > Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h:33 > + Default, Why not "Unshared"? That seems more explicit. > Source/JavaScriptCore/runtime/AtomicsObject.cpp:229 > + case 3: case 3 should return false, and case 4 should return true (along with 1 and 2). > Source/JavaScriptCore/runtime/AtomicsObject.cpp:305 > + double timeoutInNanoseconds = timeoutInMilliseconds * 1000; Missing 1000? > Source/JavaScriptCore/runtime/AtomicsObject.cpp:315 > + if (timeoutInNanoseconds == timeoutInNanoseconds) std::isnan > Source/JavaScriptCore/runtime/AtomicsObject.cpp:316 > + timeoutInNanoseconds = std::max(0., timeoutInNanoseconds); This seems to be a spec thing: is -0. a valid thing here? > Source/WTF/wtf/Atomics.h:-96 > - ASSERT(bitwise_cast<std::atomic<T>*>(location)->is_lock_free() && "expected lock-free type"); I think you want to keep these asserts.
Filip Pizlo
Comment 81 2016-10-31 11:14:48 PDT
(In reply to comment #80) > Comment on attachment 293426 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=293426&action=review > > > Source/JavaScriptCore/ChangeLog:20 > > + There is also a Atomics object in global scope, which exposes sequentiall consistent atomic > > Typo "sequential" Fixed. > > > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:95 > > +{ > > Should this set `m_shared = nullptr;` at the beginning? Or assert on it? I think it's already certain that this function is only called right after ArrayBufferContents is instantiated. > > > Source/JavaScriptCore/runtime/ArrayBuffer.cpp:101 > > + m_data = nullptr; > > It seems like setting `m_sizeInBytes = 0;` on both failure paths would be > conservatively good. I made it call reset(). > > > Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h:33 > > + Default, > > Why not "Unshared"? That seems more explicit. To reflect the naming of the types. It's ArrayBuffer, not UnsharedArrayBuffer, and "Default" seems to be closer to meaning "the ArrayBuffer that isn't special". > > > Source/JavaScriptCore/runtime/AtomicsObject.cpp:229 > > + case 3: > > case 3 should return false, and case 4 should return true (along with 1 and > 2). Oops. > > > Source/JavaScriptCore/runtime/AtomicsObject.cpp:305 > > + double timeoutInNanoseconds = timeoutInMilliseconds * 1000; > > Missing 1000? Oops. > > > Source/JavaScriptCore/runtime/AtomicsObject.cpp:315 > > + if (timeoutInNanoseconds == timeoutInNanoseconds) > > std::isnan == is a fundamental operator in C++ that already answers this question. I don't think we should mandate using helpers for operations that are already primitive. > > > Source/JavaScriptCore/runtime/AtomicsObject.cpp:316 > > + timeoutInNanoseconds = std::max(0., timeoutInNanoseconds); > > This seems to be a spec thing: is -0. a valid thing here? The spec wants +0 here, but it doesn't matter. > > > Source/WTF/wtf/Atomics.h:-96 > > - ASSERT(bitwise_cast<std::atomic<T>*>(location)->is_lock_free() && "expected lock-free type"); > > I think you want to keep these asserts. I removed them because I didn't want this noise everywhere. If we did want an assertion about the lock freedom of primitive types, we should probably put them somewhere else.
Filip Pizlo
Comment 82 2016-10-31 13:21:36 PDT
Created attachment 293459 [details] the patch
WebKit Commit Bot
Comment 83 2016-10-31 13:24:28 PDT
Attachment 293459 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 105 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 84 2016-10-31 13:24:41 PDT
Created attachment 293460 [details] the patch
WebKit Commit Bot
Comment 85 2016-10-31 13:27:58 PDT
Attachment 293460 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 106 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 86 2016-10-31 15:02:55 PDT
Comment on attachment 293460 [details] the patch Attachment 293460 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2414059 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 87 2016-10-31 15:03:01 PDT
Created attachment 293473 [details] Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Filip Pizlo
Comment 88 2016-10-31 15:46:09 PDT
Created attachment 293478 [details] the patch
WebKit Commit Bot
Comment 89 2016-10-31 15:48:51 PDT
Attachment 293478 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:101: Declaration has space between type name and * in const JSWorkerGlobalScopeBase *thisObject [whitespace/declaration] [3] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:115: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/ArrayBuffer.cpp:185: More than one command on the same line [whitespace/newline] [4] ERROR: Source/JavaScriptCore/runtime/JSGlobalObject.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:163: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/runtime/JSArrayBufferView.h:164: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 108 files If any of these errors are false positives, please file a bug against check-webkit-style.
Keith Miller
Comment 90 2016-10-31 16:18:51 PDT
Comment on attachment 293478 [details] the patch r=me. Assuming the bots are happy and you intend on importing more tests since this current testing seems a little light.
Filip Pizlo
Comment 91 2016-10-31 17:38:03 PDT
This patch passes everything for me locally. I think that EWS is seeing unrelated crashes. But I'll wait a bit before landing.
Filip Pizlo
Comment 92 2016-10-31 20:13:32 PDT
Simon Fraser (smfr)
Comment 93 2016-10-31 22:24:15 PDT
Note You need to log in before you can comment on or make changes to this bug.