Closed
Bug 991398
Opened 12 years ago
Closed 5 years ago
Tracking bug for refcounted classes that are declared on the stack
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dholbert, Unassigned)
References
Details
(Keywords: sec-other)
Filing this as a tracking bug for classes that are inconsistently refcounted, e.g. managed as nsRefPtr<Foo> in some places vs. stack variables "Foo myFoo;" in others.
(These are dangerous because they can lead to double-free bugs, if we happen to pass a pointer to a stack variable into a callstack that ends up wrapping it in a nsRefPtr. When the nsRefPtr goes out of scope, we'll free the variable.
Bug 984786 is privatizing a bunch of destructors to turn e.g. "Foo myFoo;" into a compile error for these classes, but we can't do that for classes that are already used in our code this way.
| Reporter | ||
Updated•12 years ago
|
No longer depends on: 991400
Summary: Tracking bug for classes that are inconsistently refcounted → Tracking bug for refcounted classes that are declared on the stack
| Reporter | ||
Comment 1•12 years ago
|
||
gfxContext is one case of this, though per bug 742100 it sounds like it's not currently problematic (?) and the class will be going away eventually anyway.
Updated•12 years ago
|
Group: layout-core-security → core-security
Updated•10 years ago
|
Group: core-security → core-security-release
Comment 2•5 years ago
|
||
We have static analysis to prevent refcounted classes from having public dtors, so I think we can mark this as fixed.
Group: core-security-release
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•