Closed Bug 1701895 Opened 4 years ago Closed 4 years ago

Ensure stub fields are properly aligned

Categories

(Core :: JavaScript Engine: JIT, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

On 32-bit platforms we have two stub field sizes, 4 bytes and 8 bytes. We should ensure the 8-byte fields are aligned to 8 bytes.

This likely isn't an actual problem (we rely on unaligned accesses in other places) but with the changes in bug 1700052 we'll be using more Value stub fields so it would be nice to fix this.

  • In CacheIRWriter::copyStubData, assert stub fields are aligned based on their size.
  • On 32-bit platforms, add padding to ICCacheIRStub and IonICStub to ensure stub data is aligned to 8 bytes.
  • On 32-bit platforms, insert a padding field in CacheIRWriter::addStubField if necessary.
  • Fix alignment assertions in CacheIRStubInfo methods to include the offset.
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/528b3f389dc9 Ensure stub fields are properly aligned on 32-bit. r=iain
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: