Closed Bug 470000 Opened 15 years ago Closed 15 years ago

cx->fp errors caused by JS_GET_SCRIPT_ATOM

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: benjamin)

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

JS_GET_SCRIPT_ATOM references cx->fp. This is showing up as an errors in various decompiler functions in jsopcode.cpp. I don't really understand why the decompiler would need to know anything about the current state of cx->fp.

It also shows up in SrcNotes in js.cpp, but that appears to be debugger-dumping code, and could probably just be marked JS_REQUIRES_STACK
SrcNotes is exposed to the JS shell and is not debugger-dumping code.

brendan, the cx->fp check was added as part of bug 456511... could you explain it?
It's for imacros, as the cx->fp->imacpc name suggests. Can the get-frame-pointer barrier be used here?

The decompiler cares if the currently active script is being decompiled but the pc is in an imacro, because that means the common atoms are indexed by immediate operand atom-indexes -- not the script's mapped atoms.

/be
Assignee: general → benjamin
Status: NEW → ASSIGNED
Attachment #353775 - Flags: review?(brendan)
Comment on attachment 353775 [details] [diff] [review]
Use cx->fp safely in JS_GET_SCRIPT_ATOM, rev. 1

Always use names like fp_ for macro locals to avoid clashing with a name in a macro actual parameter.

/be
Attachment #353775 - Attachment is obsolete: true
Attachment #353880 - Flags: review?(brendan)
Attachment #353775 - Flags: review?(brendan)
Comment on attachment 353880 [details] [diff] [review]
Use cx->fp safely in JS_GET_SCRIPT_ATOM, rev. 1.1

Thanks,

/be
Attachment #353880 - Flags: review?(brendan) → review+
Pushed to tracemonkey: http://hg.mozilla.org/tracemonkey/rev/159f0ffacae9
Whiteboard: fixed-in-tracemonkey
Flags: blocking1.9.1+
merged to mc
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.