Closed
Bug 392008
Opened 17 years ago
Closed 4 years ago
trace-malloc handling of realloc and free is not threadsafe
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dbaron, Unassigned)
References
Details
trace-malloc's handling of realloc is not threadsafe, on either Linux or Windows (although it's different on both).
We need to remove the address from the allocations table before calling the system realloc because it could potentially be reallocated on another thread before we get a chance to remove it from the allocations table afterwards.
Comment 1•17 years ago
|
||
Stealing. I would prefer to un-duplicate, then fix once.
/be
Updated•17 years ago
|
Blocks: aboutmemory
Reporter | ||
Comment 2•17 years ago
|
||
Note that on Mac OS X, we'd need to change the way we hook the allocation functions to fix this. Instead of using the hooks, we should override the vtable pointers in the result of malloc_default_zone(), as the #if 0-ed code in nsCycleCollector does, assuming that doing that works.
Reporter | ||
Comment 3•17 years ago
|
||
This has actually always been a problem for free on Windows as well, and is now a problem for free on Linux too.
Summary: trace-malloc handling of realloc is not threadsafe → trace-malloc handling of realloc and free is not threadsafe
Comment 4•16 years ago
|
||
Giving back this one too -- no time for trace-malloc, sigh.
/be
Assignee: brendan → general
Comment 5•4 years ago
|
||
trace-malloc was removed in bug 1014341.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•