summaryrefslogtreecommitdiff
path: root/test/MultiDex
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-03-11 09:54:22 -0700
committerMathieu Chartier <mathieuc@google.com>2015-03-11 10:38:26 -0700
commit02e5f160d9cc02da20d9e47af30f948c462f7043 (patch)
tree3a9ab3cc6e1e9226ef1c5818f16db873e28c3ec6 /test/MultiDex
parent4fe8c2a9110916386e5fe8428410cd5795f57036 (diff)
Fix sampling profiler race condition
Thread 1 is running RunSamplingThread and has just read trace into the_trace. Thread 2 is calling Trace::Stop and has just suspended all the threads. At this point thread 1 is blocked on the SuspendAll. Thread 2 goes and deletes the trace which Thread 1 still has a pointer to, calls ResumeAll(). At this point thread 1 suspends the threads and adds samples to the just deleted trace. The fix is to join the thread before we delete the trace. Bug: 18950006 Change-Id: I3090c4dac392a4e5d880c4dc8d9385aef53c7425
Diffstat (limited to 'test/MultiDex')
0 files changed, 0 insertions, 0 deletions