Closed
Bug 557776
Opened 14 years ago
Closed 14 years ago
js_InitTitle: initialise title->lock properly
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jseward, Assigned: jseward)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
595 bytes,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
jslock.cpp: js_InitTitle(JSContext *cx, JSTitle *title) initialises title->lock by memsetting it to zero: PodZero(&title->lock). This isn't the official way to do it and gives two problems: * js_FinishTitle does properly finalise it by calling js_FinishLock. As a result, runtime thread checking tools that try to pair up lock initialisations and finalisations by watching js_InitLock and js_FinishLock report floods of errors about finalisation of a lock which was never initialised. * from reading js_InitLock, PodZero-ing the lock to initialise it is only correct in the case "#ifndef NSPR_LOCK". It's not obviously correct when NSPR_LOCK is defined.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #437532 -
Flags: review?(jorendorff)
Updated•14 years ago
|
Attachment #437532 -
Flags: review?(jorendorff) → review+
Comment 2•14 years ago
|
||
Comment on attachment 437532 [details] [diff] [review] proposed fix Yes, this is an obvious bug.
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee: general → jseward
Comment 3•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/5343df124795
Keywords: checkin-needed
Whiteboard: fixed-in-tracemonkey
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/5343df124795
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•