libbinder: already sent checks abort
Checked for a few weeks these logs weren't hit in any Android testing
environment. However, they have been hit and caused problems before.
Changing these to be fatal.
Fixes: 166282674
Test: boot
Change-Id: I069b0ab4d06c8bcc0edef76490d28b591066ad49
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 194be21..fb86808 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -319,9 +319,9 @@
void BBinder::setRequestingSid(bool requestingSid)
{
- ALOGW_IF(mParceled,
- "setRequestingSid() should not be called after a binder object "
- "is parceled/sent to another process");
+ LOG_ALWAYS_FATAL_IF(mParceled,
+ "setRequestingSid() should not be called after a binder object "
+ "is parceled/sent to another process");
Extras* e = mExtras.load(std::memory_order_acquire);
@@ -345,9 +345,9 @@
}
void BBinder::setMinSchedulerPolicy(int policy, int priority) {
- ALOGW_IF(mParceled,
- "setMinSchedulerPolicy() should not be called after a binder object "
- "is parceled/sent to another process");
+ LOG_ALWAYS_FATAL_IF(mParceled,
+ "setMinSchedulerPolicy() should not be called after a binder object "
+ "is parceled/sent to another process");
switch (policy) {
case SCHED_NORMAL:
@@ -396,9 +396,9 @@
}
void BBinder::setInheritRt(bool inheritRt) {
- ALOGW_IF(mParceled,
- "setInheritRt() should not be called after a binder object "
- "is parceled/sent to another process");
+ LOG_ALWAYS_FATAL_IF(mParceled,
+ "setInheritRt() should not be called after a binder object "
+ "is parceled/sent to another process");
Extras* e = mExtras.load(std::memory_order_acquire);
@@ -419,9 +419,9 @@
}
void BBinder::setExtension(const sp<IBinder>& extension) {
- ALOGW_IF(mParceled,
- "setExtension() should not be called after a binder object "
- "is parceled/sent to another process");
+ LOG_ALWAYS_FATAL_IF(mParceled,
+ "setExtension() should not be called after a binder object "
+ "is parceled/sent to another process");
Extras* e = getOrCreateExtras();
e->mExtension = extension;