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

Function FuzzIpcTensorStream

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

Source from the content-addressed store, hash-verified

2980}
2981
2982Status FuzzIpcTensorStream(const uint8_t* data, int64_t size) {
2983 auto buffer = std::make_shared<Buffer>(data, size);
2984 io::BufferReader buffer_reader(buffer);
2985
2986 std::shared_ptr<Tensor> tensor;
2987
2988 while (true) {
2989 ARROW_SUPPRESS_DEPRECATION_WARNING
2990 ARROW_ASSIGN_OR_RAISE(tensor, ReadTensor(&buffer_reader));
2991 ARROW_UNSUPPRESS_DEPRECATION_WARNING
2992 if (tensor == nullptr) {
2993 break;
2994 }
2995 RETURN_NOT_OK(tensor->Validate());
2996 }
2997
2998 return Status::OK();
2999}
3000
3001Result<int64_t> IoRecordedRandomAccessFile::GetSize() { return file_size_; }
3002

Callers 1

LLVMFuzzerTestOneInputFunction · 0.85

Calls 3

ReadTensorFunction · 0.85
OKFunction · 0.50
ValidateMethod · 0.45

Tested by

no test coverage detected