Closed
Bug 619777
Opened 14 years ago
Closed 14 years ago
obj_toSource guard of IS_SHARP instead of !ida confuses coverity
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity)
Attachments
(1 file)
(deleted),
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
473 obj_toSource(JSContext *cx, uintN argc, Value *vp)
478 JSIdArray *ida;
498 if (!obj || !(he = js_EnterSharpObject(cx, obj, &ida, &chars))) {
500 goto out;
there's a condition here, but coverity can't reason it:
502 if (IS_SHARP(he)) {
here we assert that !ida is roughly equivalent to IS_SHARP(he):
508 JS_ASSERT(!ida);
517 goto make_string;
518 }
here we assert that ida is roughly equivalent to !IS_SHARP(he):
519 JS_ASSERT(ida);
if the guard on line 502 is ida (and ida is initialized on 478) then coverity (and friends) should be able to reason that ida isn't leaked in this function.
Comment 2•14 years ago
|
||
Comment on attachment 498206 [details] [diff] [review]
proposal
Review of attachment 498206 [details] [diff] [review]:
Sure, ok.
Attachment #498206 -
Flags: review?(jorendorff) → review+
Keywords: checkin-needed
Comment 3•14 years ago
|
||
Comment 4•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [fixed-in-cedar]
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•