Commit 50e93318 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Fix race in AllocEntrypointsInstrumented

We were using the quick_alloc_entry_points_instrumentation_counter_,
this counter is updated before the threads are suspended. The
allocator could come out of a suspend point, see that threads are
supposedly still no instrumented, continue the allocation, then
suddenly quick_alloc_entry_points_instrumentation_counter_ becomes
1 and alloc_tracking_enabled_ becomes true resulting in a failing
DCHECK.

The fix is to add a boolean that is updated only when the threads
are suspended.

Bug: 27506909

(cherry picked from commit 77d99310)

Change-Id: Id12983ef77c4fddb0394e4439ce0829777f1a70b
parent 8e57978b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment