OSDN Git Service

Fix for race in writeToParcel and unparcel
authorAmith Yamasani <yamasani@google.com>
Thu, 15 Dec 2016 22:23:24 +0000 (14:23 -0800)
committerAmith Yamasani <yamasani@google.com>
Fri, 16 Dec 2016 19:19:42 +0000 (11:19 -0800)
commit694753465b577509cecba33a90fb7cb6d50f5533
tree0e4a4eb688cdc9f1bc26f70cca07fb553533e214
parente298756bf819cea685bf843189800b6a5fda2466
Fix for race in writeToParcel and unparcel

Don't access the parcelled data while it might be recycled
by another thread.

Also make a local reference of mMap, which could be modified
by another thread.

Bug: 33325384
Test: Hard to repro, so no test
Change-Id: I77f6545ac174236a3da69c0c0f3a01b2eda3f34b
core/java/android/os/BaseBundle.java