Closed Bug 530713 Opened 16 years ago Closed 16 years ago

nanojit: fix LirReader::read() badness

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

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

References

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
In the non-DEBUG case, for LIR_start, _i ends up pointing to junk and we then do _i->opcode(). Usually it works because it only causes problems when the bogus _i->opcode() evaluates to LIR_skip, which is rare. This patch fixes it. Based on IRC discussions with Ed and Rick. insSizes[] is now in ::read() rather than global because it special-cases LIR_start in a way that isn't widely applicable.
Attachment #414170 - Flags: review?(edwsmith)
Attachment #414170 - Flags: review?(edwsmith) → review+
Attached patch patch v2Splinter Review
This version keeps the global insSizes[], as required by Tamarin (but it's ugly and should be removed eventually).
Attachment #414170 - Attachment is obsolete: true
Attachment #414173 - Flags: review?(edwsmith)
removing insSizes is okay like in the first patch; CodegenLIR.cpp in TR does use it, but i'll fix that up when i import this patch from nanojit-central. our usage of it is hacky, so this is a good excuse as any to clean it up.
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tamarin
Attachment #414173 - Flags: review?(edwsmith)
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: