diff options
| author | 2025-02-06 09:33:15 -0700 | |
|---|---|---|
| committer | 2025-02-06 09:33:15 -0700 | |
| commit | 184f274e4608f11616a93389d4ffefb91925c6d7 (patch) | |
| tree | 41fa248fe4d2bc55bed0dd2c3caab3a5fbdb8461 /libs/gui/BufferQueueThreadState.cpp | |
| parent | 03ec059e19d131dc3ea20504f7c0372eddb26d91 (diff) | |
getPlatformDisplayAngle: Fix std::vector scope error
The std::vector<const char*> variables were scoped to only within the
conditional blocks for graphicsenv_flags::feature_overrides(). However,
pointers to those vectors were added to the std::vector<EGLAttrib> attrs
which is passed to eglGetPlatformDisplay(), leading to a use-after-free
and ANGLE crashing due to a SIGSEGV.
Move the declarations of enabled/disabled std::vectors next to attrs so
their lifetimes match. Also, add a comment about why they are declared
there, so they aren't erroneously moved back inside the conditional
blocks where they are used in the future.
Bug: 372694741
Test: CQ, Manual verification
Flag: com.android.graphics.graphicsenv.flags.feature_overrides
Change-Id: I85a361819e082bc546933e2839e3741a6b4c4ffd
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions