Protect static global access with a global flag.
- The global objects are protected by a global flag, during
application teardown.
- The following APIs, which could potentially be called during
application teardown, will be NO-OP if global objects are no
longer alive.
rsContextCreate
rsContextCreateGL
rsContextDestroy
- Added a test of the problematic use-cases.
Detailed discussion:
https://goto.google.com/rs-static-destructor
Bug: 62027113
Test: mm
Test: Before the change to rsApiStubs.cpp, the test hangs during
termination.
Test: After the change to rsApiStubs.cpp, the test passes without any
problems.
Change-Id: I7a43a61d9ccf848c17a88e047e97d087132addda
(cherry picked from commit 296cd02e03565153f7dff971988adf8e8c6c365a)
5 files changed