Closed Bug 495028 Opened 15 years ago Closed 15 years ago

nanojit: add opcode checks to all LIR get/set methods

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

Nanojit currently checks the opcode for many but not all of the LIns get/set.  This patch adds checks for those methods that lack one.  This makes things safer because calling an unchecked method on the wrong instruction kind will lead to total memory bogosity.
Attachment #379838 - Flags: review?(edwsmith)
Comment on attachment 379838 [details] [diff] [review]
patch adding opcode checks to LIns get/set methods

looks nice.

minor suggestion:

#ifdef _DEBUG around isOp1() and isOp2(), if theyre only used by asserts.  or, something table driven, if they're really used in releasable code.
Attachment #379838 - Flags: review?(edwsmith) → review+
Attached patch updated patchSplinter Review
Updated patch which incorporates Ed's suggestion.
Attachment #379838 - Attachment is obsolete: true
Whiteboard: checkin-needed
http://hg.mozilla.org/tracemonkey/rev/d11ca213ecdf
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
This was marked as RESOLVED FIXED and "checkin-needed" despite being checked into tracemonkey but not m-c.  Changing it to "REOPENED" and "fixed-in-tracemonkey" because I think that's what it's supposed to be.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: checkin-needed → fixed-in-tracemonkey
I'm curious what happened to LIR_ldc here.
comment #5 was fixed by bug 497784. this bug's back to 'finished'.
Sayre, did this one ever make it into mozilla-central?
http://hg.mozilla.org/mozilla-central/rev/d11ca213ecdf
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
forgot to note it here.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: