Closed Bug 1273748 Opened 8 years ago Closed 8 years ago

wasm: decode memory sizes as unsigned

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: sunfish, Assigned: sunfish)

References

Details

Attachments

(1 file)

Attached patch wasm-misc.patchSplinter Review
This patch contains a few misc cleanups, and most significantly, changes the decoding of memory sizes to use unsigned values. This allows it to work on wasm modules encoded with the max-size field set to the maximum valid value, which is a common idiom.
Attachment #8753661 - Flags: review?(luke)
Comment on attachment 8753661 [details] [diff] [review]
wasm-misc.patch

Review of attachment 8753661 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!

::: js/src/asmjs/Wasm.cpp
@@ +791,5 @@
>      initialSize *= PageSize;
>      if (!initialSize.isValid())
>          return Fail(cx, d, "initial memory size too big");
>  
> +    // ArrayBufferObject can't currently allocate more than UINT32_MAX bytes.

s/U//
Attachment #8753661 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/8211dd011b38
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: