View | Details | Raw Unified | Return to bug 259620 | Differences between
and this patch

Collapse All | Expand All

(-)tensorflow/core/distributed_runtime/tensor_coding.cc (-2 / +2 lines)
Lines 82-88 void TensorResponse::InitPartial(const RecvTensorRespo Link Here
82
Status TensorResponse::ParseFrom(Source* source) {
82
Status TensorResponse::ParseFrom(Source* source) {
83
  if (!on_host_) {
83
  if (!on_host_) {
84
    protobuf::io::CodedInputStream input(source->contents());
84
    protobuf::io::CodedInputStream input(source->contents());
85
    input.SetTotalBytesLimit(INT_MAX, INT_MAX);  // Unlimited
85
    input.SetTotalBytesLimit(INT_MAX);  // Unlimited
86
86
87
    // Pre-parse into local storage, then delegate to device.
87
    // Pre-parse into local storage, then delegate to device.
88
    if (!meta_.ParseFromCodedStream(&input) || !input.ConsumedEntireMessage()) {
88
    if (!meta_.ParseFromCodedStream(&input) || !input.ConsumedEntireMessage()) {
Lines 218-224 bool TensorResponse::ParseTensorSubmessage( Link Here
218
218
219
bool TensorResponse::ParseFast(Source* source) {
219
bool TensorResponse::ParseFast(Source* source) {
220
  protobuf::io::CodedInputStream input(source->contents());
220
  protobuf::io::CodedInputStream input(source->contents());
221
  input.SetTotalBytesLimit(INT_MAX, INT_MAX);  // Unlimited
221
  input.SetTotalBytesLimit(INT_MAX);  // Unlimited
222
  while (true) {
222
  while (true) {
223
    auto p = input.ReadTagWithCutoff(127);
223
    auto p = input.ReadTagWithCutoff(127);
224
    int tag = GetTagFieldNumber(p.first);
224
    int tag = GetTagFieldNumber(p.first);
(-)tensorflow/core/platform/env.cc (-1 / +1 lines)
Lines 538-544 Status ReadBinaryProto(Env* env, const string& fname, Link Here
538
  ::tensorflow::protobuf::io::CodedInputStream coded_stream(stream.get());
538
  ::tensorflow::protobuf::io::CodedInputStream coded_stream(stream.get());
539
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
539
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
540
  // respectively.
540
  // respectively.
541
  coded_stream.SetTotalBytesLimit(1024LL << 20, 512LL << 20);
541
  coded_stream.SetTotalBytesLimit(1024LL << 20);
542
542
543
  if (!proto->ParseFromCodedStream(&coded_stream) ||
543
  if (!proto->ParseFromCodedStream(&coded_stream) ||
544
      !coded_stream.ConsumedEntireMessage()) {
544
      !coded_stream.ConsumedEntireMessage()) {
(-)tensorflow/core/profiler/rpc/client/dump_tpu_profile.cc (-1 / +1 lines)
Lines 102-108 Status DumpOpProfileToLogDirectory(StringPiece run_dir Link Here
102
  if (!status.ok()) {
102
  if (!status.ok()) {
103
    return errors::Internal(
103
    return errors::Internal(
104
        "Failed to convert op profile to json. Skipping... ",
104
        "Failed to convert op profile to json. Skipping... ",
105
        string(status.error_message()));
105
        string(status.message()));
106
  }
106
  }
107
  TF_RETURN_IF_ERROR(WriteStringToFile(Env::Default(), path, json));
107
  TF_RETURN_IF_ERROR(WriteStringToFile(Env::Default(), path, json));
108
  if (os) {
108
  if (os) {
(-)tensorflow/examples/ios/benchmark/BenchmarkViewController.mm (-1 / +1 lines)
Lines 113-119 bool PortableReadFileToProto(const std::string& file_n Link Here
113
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
113
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
114
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
114
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
115
  // respectively.
115
  // respectively.
116
  coded_stream.SetTotalBytesLimit(1024LL << 20, 512LL << 20);
116
  coded_stream.SetTotalBytesLimit(1024LL << 20);
117
  return proto->ParseFromCodedStream(&coded_stream);
117
  return proto->ParseFromCodedStream(&coded_stream);
118
}
118
}
119
119
(-)tensorflow/examples/ios/camera/tensorflow_utils.mm (-1 / +1 lines)
Lines 91-97 bool PortableReadFileToProto(const std::string& file_n Link Here
91
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
91
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
92
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
92
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
93
  // respectively.
93
  // respectively.
94
  coded_stream.SetTotalBytesLimit(1024LL << 20, 512LL << 20);
94
  coded_stream.SetTotalBytesLimit(1024LL << 20);
95
  return proto->ParseFromCodedStream(&coded_stream);
95
  return proto->ParseFromCodedStream(&coded_stream);
96
}
96
}
97
97
(-)tensorflow/examples/ios/simple/RunModelViewController.mm (-1 / +1 lines)
Lines 112-118 bool PortableReadFileToProto(const std::string& file_n Link Here
112
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
112
  ::google::protobuf::io::CodedInputStream coded_stream(&stream);
113
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
113
  // Total bytes hard limit / warning limit are set to 1GB and 512MB
114
  // respectively.
114
  // respectively.
115
  coded_stream.SetTotalBytesLimit(1024LL << 20, 512LL << 20);
115
  coded_stream.SetTotalBytesLimit(1024LL << 20);
116
  return proto->ParseFromCodedStream(&coded_stream);
116
  return proto->ParseFromCodedStream(&coded_stream);
117
}
117
}
118
118

Return to bug 259620