Bug 186794

Summary: Wasm: Any function argument of type Void should be a validation error
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, ews-watchlist, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, rmorisset, rniwa, ticaiolima, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch for landing
ews-watchlist: commit-queue-
Archive of layout-test-results from ews206 for win-future
none
Archive of layout-test-results from ews107 for mac-sierra-wk2
none
patch for landing none

Description Saam Barati 2018-06-18 18:41:05 PDT
...
Comment 1 Saam Barati 2018-06-18 18:41:43 PDT
<rdar://problem/41140257>
Comment 2 Saam Barati 2018-06-18 18:54:22 PDT
Created attachment 343002 [details]
patch
Comment 3 Keith Miller 2018-06-18 18:59:24 PDT
Comment on attachment 343002 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=343002&action=review

r=me with comments

> JSTests/wasm/function-tests/void-argument-type-should-be-a-validation-error.js:15
> +        .Function("callFunc", { params: ["i32", "i32", "void"], ret: "void" })
> +            .Return()
> +        .End()

Can we get some more test cases.

> Source/JavaScriptCore/wasm/WasmModuleParser.cpp:130
>              WASM_PARSER_FAIL_IF(!parseResultType(argumentType), "can't get ", i, "th argument Type");
> +            WASM_PARSER_FAIL_IF(argumentType == Type::Void, "Argument number ", i, " has type Void. An argument cannot be of type Void.");

Nit: I think this should be parseValueType.
Comment 4 Saam Barati 2018-06-18 19:03:07 PDT
Created attachment 343004 [details]
patch for landing
Comment 5 EWS Watchlist 2018-06-18 20:24:35 PDT
Comment on attachment 343004 [details]
patch for landing

Attachment 343004 [details] did not pass jsc-ews (mac):
Output: http://webkit-queues.webkit.org/results/8240187

New failing tests:
wasm.yaml/wasm/self-test/test_BuilderJSON.js.wasm-no-cjit-yes-tls-context
wasm.yaml/wasm/self-test/test_BuilderJSON.js.wasm-eager-jettison
wasm.yaml/wasm/self-test/test_BuilderJSON.js.wasm-no-tls-context
wasm.yaml/wasm/self-test/test_BuilderJSON.js.wasm-slow-memory
wasm.yaml/wasm/self-test/test_BuilderJSON.js.wasm-no-call-ic
wasm.yaml/wasm/self-test/test_BuilderJSON.js.default-wasm
Comment 6 EWS Watchlist 2018-06-18 21:15:03 PDT
Comment on attachment 343004 [details]
patch for landing

Attachment 343004 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/8241210

New failing tests:
http/tests/security/canvas-remote-read-remote-video-redirect.html
Comment 7 EWS Watchlist 2018-06-18 21:15:15 PDT
Created attachment 343016 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 8 EWS Watchlist 2018-06-19 01:16:02 PDT
Comment on attachment 343004 [details]
patch for landing

Attachment 343004 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/8244298

New failing tests:
accessibility/mac/selection-notification-focus-change.html
Comment 9 EWS Watchlist 2018-06-19 01:16:03 PDT
Created attachment 343028 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 10 Saam Barati 2018-06-19 11:09:52 PDT
Created attachment 343068 [details]
patch for landing
Comment 11 WebKit Commit Bot 2018-06-19 11:48:34 PDT
Comment on attachment 343068 [details]
patch for landing

Clearing flags on attachment: 343068

Committed r232970: <https://trac.webkit.org/changeset/232970>
Comment 12 WebKit Commit Bot 2018-06-19 11:48:36 PDT
All reviewed patches have been landed.  Closing bug.