Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ceed9bb6 authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent adf390d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment