Open
Bug 1469420
Opened 8 years ago
Updated 3 years ago
release assert if nsTArray is destroyed while being iterated over
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
Details
Jed tweeted about bug 1321066 today, which got me to wondering if we could detect if an array is destroyed while we're iterating over it. This would work by adding a bit to the header that we'd set while we're iterating (I guess using AutoRestore or something if the iteration is nested), and then crashing in the array dtor if the bit is set. The case of an array being resized is already handled safely thanks to bounds checking, so we could only do this iteration check in the dtor to reduce overhead (and make the patch easier...).
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•