MCPcopy Create free account
hub / github.com/apache/arrow / FuzzIpcTensorStream

Function FuzzIpcTensorStream

cpp/src/arrow/ipc/reader.cc:2965–2980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2963}
2964
2965Status FuzzIpcTensorStream(const uint8_t* data, int64_t size) {
2966 auto buffer = std::make_shared<Buffer>(data, size);
2967 io::BufferReader buffer_reader(buffer);
2968
2969 std::shared_ptr<Tensor> tensor;
2970
2971 while (true) {
2972 ARROW_ASSIGN_OR_RAISE(tensor, ReadTensor(&buffer_reader));
2973 if (tensor == nullptr) {
2974 break;
2975 }
2976 RETURN_NOT_OK(tensor->Validate());
2977 }
2978
2979 return Status::OK();
2980}
2981
2982Result<int64_t> IoRecordedRandomAccessFile::GetSize() { return file_size_; }
2983

Callers 1

LLVMFuzzerTestOneInputFunction · 0.85

Calls 4

ReadTensorFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
OKFunction · 0.50
ValidateMethod · 0.45

Tested by

no test coverage detected