OSDN Git Service

Don't throw TransactionTooLargeException for small payloads
authorChristopher Tate <ctate@google.com>
Thu, 25 Jun 2015 01:16:42 +0000 (18:16 -0700)
committerChristopher Tate <ctate@google.com>
Thu, 25 Jun 2015 17:50:38 +0000 (10:50 -0700)
commit02ca7a7db04b000a8e403d130781fe65b4e0d091
treeeeb28df38bcaa9db137b6ba4bcd0448a07adf291
parentd4e9e0e1d6b860c7cc93d06d8b5fdc0004e56b80
Don't throw TransactionTooLargeException for small payloads

In practice, if we ever see an apparent transaction-too-large result
with a modest-sized payload, it means that the remote process died at
just the right time (with the binder transaction already in flight
so it wasn't detected as a DEAD_OBJECT up front).  Don't throw
TransactionTooLargeException in this case, because we really do need
to distinguish that from dead-remote more accurately.

In particular, certain common execution patterns on existing hardware
trigger this circumstance, and they wind up crashing the system.
This is bad, so now we avoid it unless we're pretty sure that is
really what happened.

Bug 21801759

Change-Id: Id05f1eecc0d23dc8d0505c402e2cb68396782135
core/jni/android_util_Binder.cpp