6.4.2. Fixes Related to Serialization and Deserialization
6.4.2.1. [Critical] Unexpected union value when receiving a discriminator that does not select any union member on DataReader’s type
When the property dds.sample_assignability.accept_unknown_union_discriminator was set to 1, previous Connext releases were not always compliant with the latest OMG ‘Extensible and Dynamic Topic Types for DDS’ specification, version 1.3 when a DataWriter publishes a union sample with a discriminator value that selects a union member, and a DataReader subscribes to a union type that does not have a union member for the discriminator published by the DataWriter.
For example:
/* Publisher */
union MyUnion switch(int32) {
case 0:
int32 m1;
case 1:
int16 m2;
case 2:
double m3;
};
/* Subscriber */
union MyUnion switch(int32) {
case 0:
int32 m1;
case 1:
int16 m2;
};
In this example, if the DataWriter published a sample with a discriminator value set to 2 selecting m3, the DataReader received a sample where the discriminator is set to 0 and m1 is set to 0, the default value of the union. According to the OMG ‘Extensible and Dynamic Topic Types for DDS’ specification, version 1.3, the DataReader should preserve the discriminator value received from the DataWriter even if this discriminator value does not select any member in the DataReader’s union.
This problem only occurred when one of these conditions was true:
The unions are mutable regardless of the data encapsulation (XCDR1 or XCDR2).
The unions are appendable, and the encapsulation is XCDR2.
Note if the union discriminator did not select any member on the DataWriter’s type, such as 3 in the above example, the DataReader received the expected discriminator 3.
This release accepts a new value for the dds.sample_assignability.accept_unknown_union_discriminator property:
0 (existing value and default value): Received samples containing a union discriminator value that selects a union member on the DataWriter but not on the DataReader are dropped.
1 (existing value) : Received samples containing a union discriminator value that selects a union member on the DataWriter but not on the DataReader are set to the default union value.
2 (new value): Received samples containing a union discriminator value that selects a union member on the DataWriter but not on the DataReader preserve the discriminator value.
Received samples containing a union discriminator value that does not select a union member on the DataWriter always preserve the discriminator value on the DataReader with dds.sample_assignability.accept_unknown_union_discriminator set to 1 or 2, unless the union discriminator value is an enumerator which is not valid on the DataReader’s type. In this case, the union is set to its default value.
To be compliant with the OMG ‘Extensible and Dynamic Topic Types for DDS’ specification, version 1.3, set the value to 2.
[RTI Issue ID CORE-13058]
6.4.2.2. [Critical] Serialization of samples failed or produced a segmentation fault for types with max serialized size larger than 2GB
A DataWriter may have failed to send a sample due to serialization errors when the sample’s type had a max serialized size with a value larger than 2GB.
For example:
@nested
struct MyNestedStruct2 {
sequence<octet, 1500000000> m1;
};
@nested
struct MyNestedStruct {
sequence<octet, 1000000000> m1;
MyNestedStruct2 m2;
};
struct MyStruct {
MyNestedStruct m1;
};
In this example, the serialize operation failed with an error like this:
[0x0101C50B,0x0D4E0B41,0xBBFA04AC:0x80000003{E=DW,T=Example MyStruct,C=MyStruct,D=56}|WRITE] PRESWriterHistoryDriver_serializeSample:serialize sample error in topic 'Example MyStruct' with type 'MyStruct' and encapsulationId 1
For 32-bit platforms, the application may have produced a segmentation fault instead of failing to serialize.
This problem has been fixed.
[RTI Issue ID CORE-12687]
6.4.2.3. [Critical] Potential sample corruption when deserializing a malformed RTPS message
A sample could be corrupted/incomplete with no error logged in the case of a deserialization failure in the transport info parameter of the RTPS message. This problem has been fixed.
[RTI Issue ID CORE-13366]
6.4.2.4. [Critical] Unbounded memory growth when deserializing a malformed RTPS message
Potential unbounded memory growth occurred while parsing a malicious RTPS message. This problem has been fixed.
[RTI Issue ID CORE-13397]