libbinder_ndk: fix race related to bpbinder
In a recent CL, I incorrectly stated in a comment (which is now
corrected here) that ABpBinder::onLastStrongRef can assume the
underlying binder also has no reference count. This is simply wrong (and
such a comment should have came with an assertion).
When this was not true (you receive a binder at the same time that
another thread is dropping the last NDK-layer reference to that binder),
the detachObject call was deleting the ABpBinderTag::Value beneath the
code in lookupOrCreateFromBinder that is looking up this binder.
Bug: 192321823
Test: CtsNdkBinderTestCases (more to come)
Change-Id: I71b1081b6d6ca179d17af6bb1e4a1bb3dd4b109b
1 file changed