diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-03-11 09:54:22 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-03-11 10:38:26 -0700 |
commit | 02e5f160d9cc02da20d9e47af30f948c462f7043 (patch) | |
tree | 3a9ab3cc6e1e9226ef1c5818f16db873e28c3ec6 /test/MultiDex | |
parent | 4fe8c2a9110916386e5fe8428410cd5795f57036 (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