Fix a CC 145-alloc-tracking-stress deadlock.
When the allocation tracking gets disabled, there may be threads blocking on the system weak access for recording allocations, but when GC reenables the system weak access, it fails to wake up those blocked threads (which causes a deadlock) because the broadcast call is guarded by Heap::IsAllocTrackingEnabled(), which is false at this point. Broadcast in Heap::BroadcastForNewAllocationRecords() regardless of Heap::IsAllocTrackingEnabled(), which is safe. Also apply a similar fix for the non-CC case. Bug: 27467554 Change-Id: I74cf88bceb306589ce11a19a688be223e099e88a
Loading
Please sign in to comment