summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorJing Ji <jji@google.com>2020-07-23 23:09:43 -0700
committerJing Ji <jji@google.com>2020-07-28 00:32:30 +0000
commit630f891af58dd7ccfd9f390198c2fb4788653965 (patch)
tree9b0a89cc528c6261781ad46bb62c4ea7ee0be526 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent53c4fc325e6ec3a0aba2198bbf4050cf004f9f40 (diff)
Fix race condition in UidRecord cleanup
It's a situation that: 1) An app process is killed; 2) A new instance of this process is created right after it 3) The bindeDied handling happens after 2) During 2), while creating the new ProcessRecord, the old ProcessRecord will be removed and this makes the total num of processes in this UidRecord to be 0, then the new ProcessRecord will bump that number by 1, in the meanwhile the new ProcessRecord will be kept in the process name map, During 3), while doing the cleanup for old ProcessRecord, it tries to remove itself from the process name map, which actually has the new ProcessRecord, so the total num of processes in the UidRecord will become 0. Now the fix is to make sure we are cleaning up the right ProcessRecord, so in step 3) we will see it's already cleaned, thus we won't mess up with the UidRecord. Bug: 161466248 Test: see b/161466248#comment17 for detailed test steps Change-Id: I2685e3f0162098b9b95f6b248b67aeb498e50c8e
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions