summaryrefslogtreecommitdiff
path: root/opengl/libagl/array.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2018-10-09 11:53:39 -0700
committer Lloyd Pique <lpique@google.com> 2018-10-09 12:22:52 -0700
commit08c66224767ece5fd16d31a34f46d77eed4f7c56 (patch)
treea3870886605d2a77f7590d91653ec60dde116fee /opengl/libagl/array.cpp
parentd7cf7f4f02900bdfc8374366039a210e61c4e1f7 (diff)
[SF] Fix unittest crash
(Manual cherrypick to aosp) Some of the values passed to HWC2::Display by FakeHwcDisplayInjector as used by the test were passed by reference, with the reference being owned by the injector. However, the lifetime of the injector was effectively temporary, and so the constructed Display instance ended up holding a reference to a dead instance. This patch uses statically constructed default values for those parameters instead, so that the values will not be destroyed. The test code can also still override the values used if non-default values are ever desired. It also adds a comment warning of the possibility so it hopefully does not happen again. Bug: 111454533 Bug: 117451794 Test: atest libsurfaceflinger_unittest # On aosp_cf_x86_phone-userdebug Change-Id: I8dfe6e31111a558a7892f0eef91bd96b8dd71f59 Merged-In: I8dfe6e31111a558a7892f0eef91bd96b8dd71f59
Diffstat (limited to 'opengl/libagl/array.cpp')
0 files changed, 0 insertions, 0 deletions