Closed
Bug 198851
Opened 21 years ago
Closed 6 years ago
JSD leaks jsdcontext on shutdown
Categories
(Other Applications Graveyard :: Venkman JS Debugger, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: timeless, Assigned: rginda)
Details
(Keywords: memory-leak)
Attachments
(2 files, 1 obsolete file)
2.55 KB,
patch
|
Details | Diff | Splinter Review | |
2.74 KB,
patch
|
timeless
:
review-
|
Details | Diff | Splinter Review |
I know there's a comment indicating that jsd is concerned about its code being left alive when it shuts down, but in xpcshell i don't have that problem and the actual leak introduces noise which i don't need into valgrind output.
Comment on attachment 118209 [details] [diff] [review] introduce lock release apis and conditionally (timeless) call them I'm willing to wrap the release code in whatever magic you want, and i'll follow whatever style you like.
Attachment #118209 -
Flags: review?(rginda)
Attachment #118209 -
Flags: superreview?(brendan)
Comment 3•20 years ago
|
||
Why can't jsd clean up its resources without #ifdef DEBUG_timeless etc.? /be
I found the same leak on solaris sparc platform. I have two questions: 1. why user #ifdef ... #endif? 2. I think there is no need to put these operations in sparatered functions, since onone else will call it.
I think we can put all these free operations in one function maybe called jsd_DestroyLock(JSDStaticLock*) and move jsdc->scriptsLock = NULL; jsdc->sourceTextLock = NULL; jsdc->atomsLock = NULL; jsdc->objectsLock = NULL; jsdc->threadStatesLock = NULL; into it
i was slightly afraid about unconditionally cleaning the resources, see the comment about intentionally leaking, and hoped that it'd have been easier for me to get it committed ifdefed. i'm certainly not tied to the ifdef. brian.lu@sun.com: your suggestion doesn't work at all, the locks are void*, so the function would have to take a void** and do evil casting which is not a good idea. i've been using this patch for over a year without issue (unlike some things in jsd, such as the unsafe lock asserts).
Maybe I didn't say clear. So I made this patch. I have tested this patch it works.
Attachment #162158 -
Flags: superreview?(brendan)
Attachment #162158 -
Flags: review?(rginda)
Comment on attachment 162158 [details] [diff] [review] another proposal Sorry I found a bug in my patch
Attachment #162158 -
Flags: superreview?(brendan)
Attachment #162158 -
Flags: superreview-
Attachment #162158 -
Flags: review?(rginda)
Attachment #162158 -
Flags: review-
Attachment #162158 -
Attachment is obsolete: true
Attachment #162163 -
Flags: superreview?(brendan)
Attachment #162163 -
Flags: review?(rginda)
Reporter | ||
Comment 10•20 years ago
|
||
Comment on attachment 162163 [details] [diff] [review] a new proposal >+static void jsd_ReleaseLock(JSDContext* jsdc) This thing isn't exported, so it probably shouldn't have jsd_ prefixed. Second it doesn't take a Lock as a parameter, if you were going to have a function that did what this one does, then it would probably be called ReleaseLocks. Lastly, why bother? how is this code any better than my patch? you have a block of code which is only ever going to be used in a single place, which is long and ugly. Oh, and you're also passing a void* to a function which takes a JSDStaticLock* which is not very nice.
Attachment #162163 -
Flags: superreview?(brendan)
Attachment #162163 -
Flags: review?(rginda)
Attachment #162163 -
Flags: review-
Updated•20 years ago
|
Product: Core → Other Applications
Comment 11•17 years ago
|
||
Comment on attachment 118209 [details] [diff] [review] introduce lock release apis and conditionally (timeless) call them Over three years without r+ so I'm removing the sr? to me and the r?rginda -- try another would-be owner. /be
Attachment #118209 -
Flags: superreview?(brendan)
Attachment #118209 -
Flags: review?(rginda)
Comment 12•6 years ago
|
||
Component is obsolete so resolving bugs as INCOMPLETE
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Updated•6 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•