OSDN Git Service

Use current pid not tid to create a backtrace map.
authortony.ys_liu <tony.ys_liu@htc.com>
Wed, 20 Jan 2016 10:05:31 +0000 (18:05 +0800)
committerChristopher Ferris <cferris@google.com>
Wed, 20 Jan 2016 23:38:12 +0000 (15:38 -0800)
commit59a8c0bb74c353f879760bd6522b49cf7298666e
treeb899a8d9e4dcb19023b7754255833cf710180140
parent0021c310e2e613d6d180acda0d9d422dba8688b0
Use current pid not tid to create a backtrace map.

The BacktraceMap::Create() function assumes that the passed in
parameter is the current pid not tid. If a tid is passed in, then
the logic that creates the local map in libunwind is not used
and can bypass all of the special handling of local maps. The result
can be crashes if this map data gets out of sync with the real maps
found in the process.

Bug: 26676205
Bug: https://code.google.com/p/android/issues/detail?id=199219
Change-Id: Ibab9f7a7b99648a2cdaa185958bf6ffc368079ce
runtime/thread_list.cc
runtime/utils.cc