Closed
Bug 1415224
Opened 7 years ago
Closed 7 years ago
Kill wasm test mode
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: bbouvier, Assigned: bbouvier)
References
Details
Attachments
(4 files, 3 obsolete files)
22.65 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
99.35 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
11.41 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
14.58 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
It doesn't make sense that we'd optimize the testing of i64 and NaN with custom payloads for bug 1319203; there's already a lot of instrumentation that we could spare by just having wasm do assertions in wasm directly. This bug investigates this and see if we can remove wasm testing mode at all here.
Assignee | ||
Comment 1•7 years ago
|
||
WIP (removes NaNs). 6 files changed, 129 insertions(+), 238 deletions(-)
Comment 2•7 years ago
|
||
Looks plausible. May need more types of assertions beyond equality? Not sure yet.
Assignee | ||
Comment 3•7 years ago
|
||
Something I spotted while working on this bug: the spec says importing/exporting i64 globals will cause throwing at link time, not compile time. (also filed https://github.com/WebAssembly/design/issues/1152 for asking precisely when do we throw when calling into wasm and there's an i64 in the signature)
Assignee: nobody → bbouvier
Attachment #8925995 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8926944 -
Flags: review?(luke)
Assignee | ||
Comment 4•7 years ago
|
||
This adds infrastructure to have NaN payload assertions generated as wasm functions (that's the same approach taken by the wasm spec->JS test converter). Tests get more verbose here, but they remove the need for the wasm testing mode for NaNs, and a lot of c++ code is removed (and it makes the jit->wasm patch simpler).
Attachment #8926945 -
Flags: review?(luke)
Assignee | ||
Comment 5•7 years ago
|
||
Same testing principle (assertions generated as wasm functions) but for int64 this time.
Attachment #8926946 -
Flags: review?(luke)
Assignee | ||
Comment 6•7 years ago
|
||
Removes int64 testing mode support in C++.
Attachment #8926947 -
Flags: review?(luke)
Assignee | ||
Comment 7•7 years ago
|
||
This finishes removing wasm testing mode: it was used in one more place, so that :decoder could auto generate export calls from the non-standard "descriptors" we pass as part of WebAssembly.Module.exports() calls. I chose to make these MORE_DETERMINISTIC, since fuzzers always build shells in this mode.
Attachment #8926948 -
Flags: review?(luke)
Assignee | ||
Comment 8•7 years ago
|
||
Overall: 29 files changed, 796 insertions(+), 1178 deletions(-)
Comment 9•7 years ago
|
||
Comment on attachment 8926945 [details] [diff] [review] 1.remove-nan.patch Review of attachment 8926945 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense; nice to see that code go.
Attachment #8926945 -
Flags: review?(luke) → review+
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Comment 10•7 years ago
|
||
Comment on attachment 8926944 [details] [diff] [review] 1.int64-globals-throw.patch Moving to its own bug.
Attachment #8926944 -
Flags: review?(luke)
Assignee | ||
Updated•7 years ago
|
Attachment #8926944 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8926945 -
Attachment description: 2.remove-nan.patch → 1.remove-nan.patch
Attachment #8926945 -
Attachment filename: 2.remove-nan.patch → 1.remove-nan.patch
Assignee | ||
Updated•7 years ago
|
Attachment #8926946 -
Attachment description: 3.remove-int64.patch → 2.remove-int64.patch
Attachment #8926946 -
Attachment filename: 3.remove-int64.patch → 2.remove-int64.patch
Assignee | ||
Comment 11•7 years ago
|
||
(rebased)
Attachment #8926947 -
Attachment is obsolete: true
Attachment #8926947 -
Flags: review?(luke)
Attachment #8927852 -
Flags: review?(luke)
Assignee | ||
Updated•7 years ago
|
Attachment #8926948 -
Attachment description: 5.remove-wasm-test-mode.patch → 4.remove-wasm-test-mode.patch
Attachment #8926948 -
Attachment filename: 5.remove-wasm-test-mode.patch → 4.remove-wasm-test-mode.patch
Comment 12•7 years ago
|
||
Comment on attachment 8926946 [details] [diff] [review] 2.remove-int64.patch Review of attachment 8926946 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit-test/lib/wasm.js @@ +90,4 @@ > } > newSrc += ')'; > + // TODO remove > + print(newSrc) nit: TODO
Attachment #8926946 -
Flags: review?(luke) → review+
Comment 13•7 years ago
|
||
Comment on attachment 8926948 [details] [diff] [review] 4.remove-wasm-test-mode.patch Review of attachment 8926948 [details] [diff] [review]: ----------------------------------------------------------------- Yay! r+ with one requested change; feel free to propose alternatives, though. ::: js/src/wasm/WasmJS.cpp @@ +544,5 @@ > if (!kindStr) > return false; > props.infallibleAppend(IdValuePair(NameToId(names.kind), StringValue(kindStr))); > > +#ifdef JS_MORE_DETERMINISTIC I'm a bit reticent to use JS_MORE_DETERMINSTIC since it changes semantics and it's not clearly testing-only (and might morph meaning over time). There is a MOZ_FUZZING_SAFE envvar which seems like a better signal. We wouldn't want to probe getenv() all the time, but it looks to be cached in a fuzzingSafe global in TestingFunctions.cpp; could we use an 'extern' to grab that?
Attachment #8926948 -
Flags: review?(luke) → review+
Updated•7 years ago
|
Attachment #8927852 -
Flags: review?(luke) → review+
Comment 14•7 years ago
|
||
Thanks!
Assignee | ||
Comment 15•7 years ago
|
||
> could we use an 'extern' to grab that?
Yes, by making fuzzingSafe non-static in the TestingFunctions.cpp file. Thanks for the reviews!
Assignee | ||
Comment 16•7 years ago
|
||
A note to our dear fuzzer people: note this set of patches will remove the --wasm-test-mode shell runtime flag, and annotated wasm imports/exports (with signatures) will now need the MOZ_FUZZING_SAFE environment variable set.
Comment 17•7 years ago
|
||
Pushed by bbouvier@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ff37d9f812be Remove wasm testing mode for custom NaN payloads; r=luke https://hg.mozilla.org/integration/mozilla-inbound/rev/bcae00340c54 Have wasm assertions auto-generated in wasm; r=luke https://hg.mozilla.org/integration/mozilla-inbound/rev/15613c4e6af3 Remove jit test mode support for int64 testing; r=luke https://hg.mozilla.org/integration/mozilla-inbound/rev/fe6091ddbf6b Remove wasm test mode entirely; r=luke
Comment 18•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ff37d9f812be https://hg.mozilla.org/mozilla-central/rev/bcae00340c54 https://hg.mozilla.org/mozilla-central/rev/15613c4e6af3 https://hg.mozilla.org/mozilla-central/rev/fe6091ddbf6b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 19•7 years ago
|
||
Won't fix for 58, let it ride the train.
You need to log in
before you can comment on or make changes to this bug.
Description
•