Closed Bug 907807 Opened 11 years ago Closed 11 years ago

Suppress GC when calling the API callback during error reporting

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 908881

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 obsolete file)

Attached patch hazard_expandErrorArgs-v0.diff (obsolete) — Splinter Review
This is currently causing the static analysis to report hazards because the analysis does not do dataflow and, thus, cannot tell that callers that pass NULL to TwoByteCharsToUTF8CharsZ cannot JS_ReportError. I think it would be problematic in any case to receive an OOM in the middle of error reporting, so suppressing GC over this API exposed callback seems like the right thing to do, regardless of exact rooting.

Bill, is this assessment reasonable?
Attachment #793550 - Flags: review?(wmccloskey)
Oh dear, that second doesn't actually logic when I re-read it. How about:

"I think it would be problematic in any case to make any significant use of JSAPI in the middle of error reporting, so suppressing GC should not change behavior in practice."
I'm pretty sure that this is not the only path that can GC during JS_ReportError. How will this actually fix the TwoByteCharsToUTF8CharsZ problem?
Comment on attachment 793550 [details] [diff] [review]
hazard_expandErrorArgs-v0.diff

Derp, you are right. This will not fix anything. I will give this hazard some more thought.
Attachment #793550 - Attachment is obsolete: true
Attachment #793550 - Flags: review?(wmccloskey)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: