libbinder: Support unaligned reads/writes in Parcel.cpp

Parcel words have a 4 byte alignment. Calls to readAligned
and writeAligned with larger types, e.g., binder_uintptr_t
from readPointer, would crash with an UBSan violation.
This fixes those crashes by using memcpy() to copy
unaligned values and require that all such values are
trivially copyable.

Bug: 2002930
Test: atest binderRpcTest
Change-Id: Id9430ca85a7d9ae8e9df7328ef7f64fa432233a6
1 file changed