We are using c++ protocol buffer v3.0.2 for some structures' serialization and deserialization.
We are able to serialize a large PB message (~ 600MB) to a buffer and verfied the serialized size equals to PB.ByteSize().
Then when we try to deserialize the buffer back to the PB message. We are expecting the deserialization fails. But randomly, sometimes we see the deserialization succeeds, but the deserialized PB message only has a partial content with a ByteSize() == 64MB.
We wonder if there is anyone encountered this issue before. We would like to have a consistent behavior that all deserialization should fail (not succeed but return some wrong result).
serialization function we use: SerializeWithCachedSizesToArray(uint8 * target) const
deserialization function we use: ParseFromArray(const void * data, int size).
required uint64 a = 1;
repeated uint64 b = 2;
repeated A c = 1;