audiopolicy: Remove global static initializers
Replace global static instances of non-primitive types with function static instances. The latter get initialized on the first call to the function instead of module load time. This also gets rid of ASAN UAF errors reported during unit test execution. Bug: 150649241 Test: atest audiopolicy_tests Test: atest audio_health_tests (for ASAN-instrumented libraries and test) Change-Id: I514c9205b9d3e7a3f0a1d8aa71d71fcc792e7a7b Merged-In: I514c9205b9d3e7a3f0a1d8aa71d71fcc792e7a7b
Loading
Please register or sign in to comment