summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-08-01 15:48:43 -0700
committer Steven Moreland <smoreland@google.com> 2019-08-02 20:03:27 +0000
commit7b10226a880b51591e192ff2c0415aa6fa50ce6d (patch)
treee85e4433de575e51cfe4ccececb3b95d374e24a2 /libs/binder/Parcel.cpp
parenta86a3569411faff2bff8dc08c6677646d91f2f7e (diff)
Keep Parcel size stable.
The size of 32-bit on arm 'Parcel' was accidentally changed. Fix this by making stability 16-bits (there is not enough space in Parcel right now to keep the 32-bit mask without combining some of the bools). This broke a device in internal master with some 32-bit prebuilts. Bug: 137348710 Test: TH Test: boots on hawk Change-Id: Ifd9aa07ae359557ff94b600c1b64bb565be85dc2
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 0b9849ab11..ba44c66020 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -77,6 +77,9 @@ static size_t pad_size(size_t s) {
namespace android {
+// many things compile this into prebuilts on the stack
+static_assert(sizeof(Parcel) == 60 || sizeof(Parcel) == 120);
+
static pthread_mutex_t gParcelGlobalAllocSizeLock = PTHREAD_MUTEX_INITIALIZER;
static size_t gParcelGlobalAllocSize = 0;
static size_t gParcelGlobalAllocCount = 0;