Graceful failure in SerializeToArray().
Graceful failure in SerializeToArray().

See https://github.com/tensorflow/tensorflow/issues/19657 for
motivation. But long story short, without this change:

m.SerializeToArray(buffer, m.ByteSizeLong());

would result in a CHECK failure if m.ByteSizeLong() returned a value
>2GB.

google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf,google/protobuf