# Tail padding and base class references
Consider a `Base` class with tail padding:
```cpp
struct Base {
uint64_t a;
uint32_t b;
// 32 bits of tail padding
~Base() {} // Itanium ABI won't do this optimization unless our type is non-POD
};
```
Fields of child classes may be placed in the tail padding:
```
struct Child: public Base {
uint32_t c; // C++ may store this in the tail padding of Base
};
// Resulting layout of `Child` is:
{ uint64_t a; uint32_t b; uint32_t c; }
// in 128 bits
```
In Rust, `Base` is in Rust, `Base` is 128 bits (includes tail padding), so this code:
```
*child.as_mut_base() = Base { a: 1, b: 2 };
```
may overwrite the tail padding containing the child field!
We'd instead like `Base` to only be 96 bits but with a stride of 128 (or `data_size_of` 96 and `size_of` 128).
This would require ensuring that Rust unsafe code does not overwrite tail padding of base class types.
Note that this would also be useful for native Rust types, such as tuples. It may be too late to make this change: lots of existing Rust code assumes writing to tail padding is allowed.