Closed Bug 1680968 Opened 4 years ago Closed 4 years ago

Use the correct MaxOffsetGuardLimit in codegen and masm

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

The MaxOffsetGuardLimit depends not only on whether huge memory support is compiled-in, but also on whether huge memory has been disabled at run-time due to a scarcity of VM space. In codegen and masm we assert against the constant MaxOffsetGuardLimit, but this value will be too large if huge memory is present but disabled, thus rendering the asserts ineffective. Instead, we need to use the correct, computed value.

On large-memory systems when we run with large memory disabled (due to
VM limitations usually), the offset guard limit is not the normal 2^31
but the smaller 2^16, and codegen and masm should use the correct
computed value when asserting that an offset in an access is smaller
than the limit. This requires the computed value to be passed into
the masm and stored there, whence it can be read by codegen and masm
routines.

Depends on D98855

Attachment #9191524 - Attachment description: Bug 1680968 - Use the correct MaxOffsetGuardLimit in masm, codegen. → Bug 1680968 - Use the correct MaxOffsetGuardLimit in masm, codegen. r?rhunt
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe4ea0313118 Use the correct MaxOffsetGuardLimit in masm, codegen. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: