4.9. Data Corruption
4.9.1. [Critical] Undefined behavior using XCDR2 with keyed topic types with key union members
XCDR2 with keyed topic types with key union members was not supported. For example:
union MyUnion switch(long) {
case 0:
long m_long;
case 1:
short m_short;
};
struct StructWithUnionKey {
@key MyUnion m_union;
long m_long;
};
The behavior was undefined if any of your topic types had a union key member going from a potential segmentation fault to an erroneous key hash in which two different instances could be considered equal.
[RTI Issue ID CODEGENII-2018]