OSDN Git Service

BQ: Fix segfault in dump()
authorPablo Ceballos <pceballos@google.com>
Thu, 5 May 2016 20:49:03 +0000 (13:49 -0700)
committerPablo Ceballos <pceballos@google.com>
Thu, 5 May 2016 20:49:03 +0000 (13:49 -0700)
commitadf51bac81fa28637d00227a44d7b20ea035980a
tree63ddcd5415205f8c64876bb5832f4bfca2224a51
parent9a8ddb6e71605d5304226234ed01cedccf54e849
BQ: Fix segfault in dump()

When dequeueBuffer() is called we put the slot in mActiveBuffers, then
don't hold the BufferQueue lock while allocation occurs. So a slot
might be in mActiveBuffers but not have a buffer attached yet. Prevent
the dump function from segfaulting in this case.

Bug 27128710

Change-Id: Ie1480c0f9b2544554fc3281045e55ad30605e6ec
libs/gui/BufferQueueCore.cpp