RESOLVED FIXED 177102
Allow modern decoding of Vectors
https://bugs.webkit.org/show_bug.cgi?id=177102
Summary Allow modern decoding of Vectors
Alex Christensen
Reported 2017-09-18 14:22:26 PDT
Allow modern decoding of Vectors
Attachments
Patch (72.96 KB, patch)
2017-09-18 14:23 PDT, Alex Christensen
no flags
Patch (72.96 KB, patch)
2017-09-18 14:29 PDT, Alex Christensen
no flags
Patch (73.88 KB, patch)
2017-09-18 14:36 PDT, Alex Christensen
no flags
Patch (76.93 KB, patch)
2017-09-18 14:52 PDT, Alex Christensen
no flags
Patch (77.59 KB, patch)
2017-09-18 14:59 PDT, Alex Christensen
no flags
Patch (124.21 KB, patch)
2017-09-19 10:26 PDT, Alex Christensen
no flags
Patch (127.89 KB, patch)
2017-09-19 10:40 PDT, Alex Christensen
no flags
Patch (129.51 KB, patch)
2017-09-19 10:57 PDT, Alex Christensen
no flags
Patch (131.91 KB, patch)
2017-09-19 11:17 PDT, Alex Christensen
no flags
Patch (140.81 KB, patch)
2017-09-19 11:54 PDT, Alex Christensen
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (2.35 MB, application/zip)
2017-09-19 14:03 PDT, Build Bot
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.15 MB, application/zip)
2017-09-19 15:43 PDT, Build Bot
no flags
Patch (145.77 KB, patch)
2017-09-19 15:51 PDT, Alex Christensen
no flags
Patch (145.75 KB, patch)
2017-09-19 16:16 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2017-09-18 14:23:51 PDT
Alex Christensen
Comment 2 2017-09-18 14:29:01 PDT
Alex Christensen
Comment 3 2017-09-18 14:36:02 PDT
Alex Christensen
Comment 4 2017-09-18 14:52:29 PDT
Alex Christensen
Comment 5 2017-09-18 14:59:02 PDT
Andy Estes
Comment 6 2017-09-18 16:00:05 PDT
Comment on attachment 321137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321137&action=review > Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp:38 > -IDBDatabaseIdentifier::IDBDatabaseIdentifier(const String& databaseName, const SecurityOrigin& openingOrigin, const SecurityOrigin& mainFrameOrigin) > +IDBDatabaseIdentifier::IDBDatabaseIdentifier(const String& databaseName, const SecurityOriginData& openingOrigin, const SecurityOriginData& mainFrameOrigin) Can the SecurityOriginDatas be rvalue references? > Source/WebKit/Platform/IPC/ArgumentCoders.h:274 > + static std::optional<Vector<T, inlineCapacity>> decode(Decoder& decoder) It would be nice if we implemented the non-optional version of this function in terms of the optional-returning version. > Source/WebKit/Platform/IPC/ArgumentCoders.h:280 > + Vector<T, inlineCapacity> vector; We should use reserveInitialCapacity() here since we know the size. > Source/WebKit/Platform/IPC/ArgumentCoders.h:286 > + vector.append(WTFMove(*element)); We should use uncheckedAppend(). > Source/WebKit/Platform/IPC/ArgumentCoders.h:324 > + static std::optional<Vector<T, inlineCapacity>> decode(Decoder& decoder) It would be nice if we implemented the non-optional version of this function in terms of the optional-returning version. > Source/WebKit/Shared/RTCNetwork.cpp:143 > + return result; WTFMove? > Source/WebKit/Shared/RTCNetwork.cpp:150 > + return result; Ditto. > Source/WebKit/Shared/RTCNetwork.cpp:213 > + return result; Ditto. > Source/WebKit/Shared/WebCompiledContentRuleListData.cpp:79 > + return compiledContentRuleListData; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:660 > + return rect; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:815 > + return recentSearch; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:944 > + return pluginInfo; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:2258 > + return blobPart; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:2508 > + return statistics; Ditto. > Source/WebKit/Shared/WebCoreArgumentCoders.cpp:2566 > + return device; Ditto. > Source/WebKit/Shared/WebPopupItem.cpp:123 > + return item; Ditto. > Source/WebKit/Shared/Gamepad/GamepadData.cpp:86 > + return data; Ditto. > Source/WebKit/Shared/Plugins/NPIdentifierData.cpp:93 > + return result; Ditto. > Source/WebKit/Shared/Plugins/NPVariantData.cpp:171 > + return result; Buncha dittos.
Alex Christensen
Comment 7 2017-09-19 10:26:16 PDT
Alex Christensen
Comment 8 2017-09-19 10:40:33 PDT
Alex Christensen
Comment 9 2017-09-19 10:57:37 PDT
Alex Christensen
Comment 10 2017-09-19 11:17:26 PDT
Alex Christensen
Comment 11 2017-09-19 11:54:00 PDT
Build Bot
Comment 12 2017-09-19 14:03:14 PDT
Comment on attachment 321227 [details] Patch Attachment 321227 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4596440 Number of test failures exceeded the failure limit.
Build Bot
Comment 13 2017-09-19 14:03:15 PDT
Created attachment 321240 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 14 2017-09-19 15:43:18 PDT
Comment on attachment 321227 [details] Patch Attachment 321227 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4597191 Number of test failures exceeded the failure limit.
Build Bot
Comment 15 2017-09-19 15:43:20 PDT
Created attachment 321258 [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.12.5
Alex Christensen
Comment 16 2017-09-19 15:51:14 PDT
Anders Carlsson
Comment 17 2017-09-19 16:09:15 PDT
Comment on attachment 321259 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321259&action=review > Source/WebKit/Platform/IPC/ArgumentCoders.h:271 > + Vector<T, inlineCapacity> vector; > + vector.reserveInitialCapacity(size); There's a reason why reserveInitialCapacity wasn't called here - a compromised web process could send MAXINT and cause an allocation failure.
Alex Christensen
Comment 18 2017-09-19 16:11:08 PDT
Wouldn't it crash either way?
Alex Christensen
Comment 19 2017-09-19 16:16:04 PDT
Alex Christensen
Comment 20 2017-09-19 16:18:27 PDT
Radar WebKit Bug Importer
Comment 21 2017-09-27 12:24:20 PDT
Note You need to log in before you can comment on or make changes to this bug.