OSDN Git Service

Do not hold hash table lock while backtracing.
authorChristopher Ferris <cferris@google.com>
Sun, 12 Jul 2015 05:47:06 +0000 (22:47 -0700)
committerChristopher Ferris <cferris@google.com>
Mon, 13 Jul 2015 20:18:31 +0000 (13:18 -0700)
commit3a40a0000a2051bab284a220ed5dfa6d2978a744
tree6f03d507355bd6a4f9496fe1e4e9d6e6637552da
parent147a50d06e1183e3f39f4f6d0fa28748b33d4aa9
Do not hold hash table lock while backtracing.

There is a deadlock if holding the hash table lock while trying to do
a backtrace. Change the code so that the hash table lock is only held
while actually modifying either g_hash_table, or while modifying an
entry from g_hash_table.

Bug: 22423683
(cherry picked from commit 9fee99b06013787054a312449b94115038e2ad7c)

Change-Id: I72173bfe6f824ceaceea625c24e7851b87467135
libc/bionic/malloc_debug_leak.cpp