Closed Bug 621144 Opened 9 years ago Closed 9 years ago

ConservativeGCThreadData::recordStackTop should annotate its use of setjmp

Categories

(Core :: JavaScript Engine, enhancement)

All
Linux
enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: igor)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

of 116 calls to setjmp within a coverity analysis, only 5 don't check setjmp for failure.

the glibc(?) manual says:

setjmp() returns 0 if returning directly and non-zero when returning from longjmp().

Igor says that setjmp is used to record registers not for a longjmp.

He offered to add a comment explaining its uses and a (void) or similar to help coverity (and similar) users.
oh, technically coverity sees this as a _setjmp call not a setjmp call (the distinction being that it does not save signal context).
Attached patch v1Splinter Review
Comments and (void) annotation
Attachment #499512 - Flags: review?(timeless)
Attachment #499512 - Flags: review?(timeless) → review+
http://hg.mozilla.org/tracemonkey/rev/cdf65c66cfbd
Whiteboard: fixed-in-tracemonkey
Comment on attachment 499512 [details] [diff] [review]
v1

Monimating for 2.0: this is an annotation-only patch to help with coverity analysis.
Attachment #499512 - Flags: approval2.0?
http://hg.mozilla.org/mozilla-central/rev/cdf65c66cfbd
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #499512 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.