Zero-init HIDL core types (all)

hidl_pointer - already zero initialized
hidl_string - now memset to 0
hidl_array - has no pad to initialize, default initialize since we
    now expect structs to be default initialized to sane values.
hidl_vec - now memset to 0
hidl_memory - has three aligned(8) items which are always set
hidl_version - unused, but has two uint16_t entries

Zero-init HIDL core types (hidl_handle).
Has 7 padded bits at the end.

Since they are passed across processes.

Bug: 131356202
Test: print out values

Change-Id: I3979232879bb437d17d3a6f6013b53b2951a2138
Merged-In: I56bacf9ca7ac51d73449d11883c6224e214b8773
Merged-In: I8dd52e196e1585028d91d97f00861021c21ec09c
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 6377c46..0b80cd4 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -68,6 +68,7 @@
 struct hidl_pointer {
     hidl_pointer()
         : _pad(0) {
+        static_assert(sizeof(*this) == 8, "wrong size");
     }
     hidl_pointer(T* ptr) : hidl_pointer() { mPointer = ptr; }
     hidl_pointer(const hidl_pointer<T>& other) : hidl_pointer() { mPointer = other.mPointer; }