The quick way to test this case is:
static_assert(sizeof(StructOfInts) == (3 * sizeof(int)), "size mismatch");
The best way to accomplish this (IMO) is to use a symmetric form: serialize field-by-field and then also deserialize field-by-field.
In short, to rely on the behaviour your implementation uses is to rely on the ABI of the targeted architecture, rather than the standard (BAD). Thus, it could result in 'corruption'.
The size of the structure can vary by ABI, and the size of ints and even their byte order could vary -- resulting in 'corruption'. Padding and alignment is also specified by an ABI.
So fixed width types, explicit endianness, and field by field symmetric serialization will often be what you need.