diff options
| author | 2022-12-13 10:08:23 -0800 | |
|---|---|---|
| committer | 2022-12-13 10:17:59 -0800 | |
| commit | 375525ff4103081876dc64ec3af3247177c5d1ac (patch) | |
| tree | 09fa1b0e514df989295d507a9d938849b8d8f76c /libs/androidfw/ApkParsing.cpp | |
| parent | 261247f6045ac53fea4331e344b49eae454968db (diff) | |
Make ImageWriter thread safe
The various functions in ImageWriter were not protected by a lock, which
led to segfaults under certain race conditions.
This CL adds a mutex to prevent ImageWriter methods from executing while
ImageWriter is closing. This also prevent multiple calls to close from
executing simultaneously.
It also adds a simialar mutex to WriterImageSurface to prevent
simultaneous calls to close().
Bug: 244262872
Test: mediaframeworktest:com.android.mediaframeworktest.stress
Change-Id: I44976e5a36154ce98f64e2982865b2defcec7f5e
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions