Wasm baseline compiler: fix inconsistent indexing in MachineStackTracker::{set,is}GCPointer

RESOLVED FIXED in Firefox 68

Status

()

defect
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: jseward, Assigned: jseward)

Tracking

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

MachineStackTracker::setGCPointer claims in a comment that its argument
|offsetFromSP| is an index up from the lowest address denoted by the stack
map. It implements that consistently with the comment.

MachineStackTracker::isGCPointer makes the same claim in a comment, but
actually implements the indexing in the opposite direction.

MachineStackTracker::setGCPointer claims in a comment that its argument
|offsetFromSP| is an index up from the lowest address denoted by the stack
map. It implements that consistently with the comment.

MachineStackTracker::isGCPointer makes the same claim in a comment, but
actually implements the indexing in the opposite direction.

This patch:

  • inverts the indexing direction of ::isGCPointer, making it consistent with
    the comments and with ::setGCPointer

  • changes the one-and-only use point of ::isGCPointer, in createStackMap(),
    accordingly. Rather than change the argument to ::isGCPointer, the
    iteration direction of the containing loop is inverted, since that fits
    better with the surrounding code.

Pushed by jseward@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfafd091d301
Wasm baseline compiler: fix inconsistent indexing in MachineStackTracker::{set,is}GCPointer.  r=lhansen.
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jseward
You need to log in before you can comment on or make changes to this bug.