Closed
Bug 83508
Opened 23 years ago
Closed 23 years ago
crash in thread cleanup in nsExceptionService
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: jband_mozilla, Assigned: markh)
References
Details
Attachments
(2 files)
784 bytes,
patch
|
Details | Diff | Splinter Review | |
1.14 KB,
patch
|
Details | Diff | Splinter Review |
Hey Mark. Two bugs for the price of one! In nsExceptionService::DoDropThread... http://lxr.mozilla.org/seamonkey/search?string=nsExceptionService%3A%3ADoDrop (I'll attach this too to make it easy to apply) Index: nsExceptionService.cpp =================================================================== RCS file: /cvsroot/mozilla/xpcom/base/nsExceptionService.cpp,v retrieving revision 1.2 diff -u -r1.2 nsExceptionService.cpp --- nsExceptionService.cpp 2001/05/08 17:39:22 1.2 +++ nsExceptionService.cpp 2001/05/31 18:15:23 @@ -304,9 +304,9 @@ /*static*/ void nsExceptionService::DoDropThread(nsExceptionManager *thread) { if (thread == firstThread) { - firstThread = nsnull; + firstThread = firstThread->mNextThread; } else { - nsExceptionManager *look = firstThread->mNextThread; + nsExceptionManager *look = firstThread; while (look && look->mNextThread != thread) { look = look->mNextThread; } 1) The first change avoids a later crash. You don't want to orphan the list just because you're removing the first item. 2) The other change keeps you from failing to find the thread when it is the second item in the list; i.e. thread == firstThread->mNextThread. I just checked in an old xpcshell multithreaded test that had been kicking around (mostly to find threading bugs in the JS Engine). See mozilla/js/src/xpconnect/tests/js/old/threads.js If you like these changes then please take care of getting them into the tree. sr=jband, r=you, approval you have to get.
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
Eeek - sorry about that John, and thanks for the patch! Mail sent to drivers seeking a=
Status: NEW → ASSIGNED
Comment 3•23 years ago
|
||
Unify the basis and induction cases! Patch coming up, also provides an r/sr= if you like it (jband can't sr= his own patches, drivers will insist). /be
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
The patch looks good (and elegant) to me! Release builds could die in pathological cases (ie, if the assert ever fails in debug build, the same scenario will crash release), but I assume we are happy with the debug only check? I am :) I am a little confused by Brendan's comment on the the sr= - if you are now offering the sr=, aren't we in the same position as before - ie, you sr'ing your own patch? Maybe just to save confusion jband can _now_ offer the sr! Still need an a= tho!
Comment 6•23 years ago
|
||
a=blizzard for the trunk
Reporter | ||
Comment 7•23 years ago
|
||
sr=jband
Assignee | ||
Comment 8•23 years ago
|
||
Checked in rev 1.3 of nsExceptionService.cpp.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•