Closed Bug 1584551 Opened 6 months ago Closed 6 months ago

On ARM64 Linux, the sp is stored in the 'sp' field of the sigcontext, not in regs[32]

Categories

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

ARM64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: lth, Assigned: lth)

Details

Attachments

(1 file)

Coverity points out that the regs member has only 31 members and that regs[31] therefore is out of bounds; the saved SP should be accessed through the 'sp' field. Assuming normal struct layout, regs[32] accesses the right datum, and we never write this field, and testing would have caught it had we read the wrong datum, so there's no cause for alarm here, it just needs to be fixed.

The Android sdk code I have here also uses regs[0..30] and sp.

Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51b5a9055e9f
Use correct register name for sigcontext's SP on AMR64 linux. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.