diff options
author | 2020-12-17 01:01:06 +0000 | |
---|---|---|
committer | 2020-12-17 01:01:06 +0000 | |
commit | ceed9bb6f875d8afbd3dbd9ff61f6e61bfd5def5 (patch) | |
tree | affc16018cd892284d980e9783fc792cd21e9682 /libs/binder/ProcessState.cpp | |
parent | adf390d7a03cb7cb0a1141f54e6efa1674eb6359 (diff) |
libbinder: simplify setIpcSetDataReference
This deduplicates part of 'freeInit', so that if a reply parcel is
re-used by a client, its previous state may leak into the next step.
Client code essentially look like this:
Parcel reply;
...->transact(..., &reply, ...);
// inside this call, in waitForResponse
reply->ipcSetDataReference(...);
However, if multiple transact calls are sent, then other data in Parcel
might be undesirably mutated. Specifically, any field of Parcel which is
currently not set here. However, when receiving a reply from another
process, we want it in a very particular state (and any options on that
Parcel which we want to set on that Parcel should be set by libbinder
itself, if there are every any).
Bug: 167966510
Test: boot & test mapping tests here
Change-Id: Ib834b94c78ac4f481eba280dcec150f53127ce3e
Diffstat (limited to 'libs/binder/ProcessState.cpp')
0 files changed, 0 insertions, 0 deletions