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

Function FuzzIpcTensorStream

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

Source from the content-addressed store, hash-verified

2887}
2888
2889Status FuzzIpcTensorStream(const uint8_t* data, int64_t size) {
2890 auto buffer = std::make_shared<Buffer>(data, size);
2891 io::BufferReader buffer_reader(buffer);
2892
2893 std::shared_ptr<Tensor> tensor;
2894
2895 while (true) {
2896 ARROW_ASSIGN_OR_RAISE(tensor, ReadTensor(&buffer_reader));
2897 if (tensor == nullptr) {
2898 break;
2899 }
2900 RETURN_NOT_OK(tensor->Validate());
2901 }
2902
2903 return Status::OK();
2904}
2905
2906Result<int64_t> IoRecordedRandomAccessFile::GetSize() { return file_size_; }
2907

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