In omt.cc, we take an address of a data member in a templated function:
This function is instantiated with an instance of omt_node_templated:
Where the omtdata_t member is a referenced_xid_tuple, which is an 8 byte aligned type currently.
Because of the packing/alignment of omt_node_templated, the value member is potentially unaligned, and taking the address of an unaligned data member is undefined behavior and a potential crash source on some platforms. Clang reports a warning about this.
We have several possible solutions:
- Silence the warning, as this shouldn't cause any issues on x86
- Remove the packing/alignment attributes from omt_node_templated
- Relax the alignment requirements of referenced_xid_tuple