Open Bug 405455 Opened 17 years ago Updated 2 years ago

Chrome registry memmoves nsVoidArrays; breaks leak debugging

Categories

(Toolkit :: Startup and Profile System, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

Details

(Keywords: autotest-issue, memory-leak)

Memmoving an object that does ctor/dtor counting breaks the count, which is keyed off of the object address. The chrome registry does this in at least two places: 1) OverlayListEntry allows memmove. Perhaps it shouldn't. 2) PackageEntry has ProviderArray members which have nsVoidArray members and uses raw PLDHashTable with the stub moveentry. For the latter, would it make sense to use a copy-constructing moveentry and change the array from an nsVoidArray to an nsTArray<ProviderEntry>? That would make copy-construction easier, and perhaps reduce allocations... Due in part to these issues I can't tell whether mailnews is in fact leaking nsVoidArrays: leak logging claims to leak thousands of them, but all the ones I've found so far are one of these two issues.
Keywords: autotest-issue
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.