d0919623a2
The free track mechanism could fail if, at the same time a free occurs, another thread is trying to free and verify the same allocation. This doesn't work if the freed allocation is added to the list and we still do work on it. The fix is to only add to the free list when we are done with the allocation. Also fix a problem where the usable size is computed incorrectly because two of the arguments where reversed. In addition, add a check that the allocation being verified has the correct tag before trying to check the body of the allocation. Add a test to catch the original failure. Add a test for the tag being different. Bug: 27601650 Change-Id: Ie9200677d066255b8e668a48422f23f909f4ddee |
||
---|---|---|
.. | ||
tests | ||
Android.mk | ||
backtrace.cpp | ||
backtrace.h | ||
BacktraceData.cpp | ||
BacktraceData.h | ||
Config.cpp | ||
Config.h | ||
debug_disable.cpp | ||
debug_disable.h | ||
debug_log.h | ||
DebugData.cpp | ||
DebugData.h | ||
exported32.map | ||
exported64.map | ||
FreeTrackData.cpp | ||
FreeTrackData.h | ||
GuardData.cpp | ||
GuardData.h | ||
malloc_debug.cpp | ||
malloc_debug.h | ||
MapData.cpp | ||
MapData.h | ||
TrackData.cpp | ||
TrackData.h |