GH-49918: [C++][Parquet] Catch std::vector allocation errors in encoding fuzzer - #49919
Conversation
|
@github-actions crossbow submit -g cpp |
|
Revision: 7c9ea2f Submitted crossbow builds: ursacomputing/crossbow @ actions-679913723d |
| allocator() noexcept : pool_(default_memory_pool()) {} | ||
| /// \brief Construct an allocator from the given MemoryPool | ||
| explicit allocator(MemoryPool* pool) noexcept : pool_(pool) {} | ||
| allocator(MemoryPool* pool) noexcept : pool_(pool) {} // NOLINT: runtime/explicit |
There was a problem hiding this comment.
Because it allows writing PoolVector<c_type> chunk_values(pool()); without having to spell out the allocator instantiation explicitly.
|
After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit 9d545fb. None of the specified runs were found on the Conbench server. The full Conbench report has more details. |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 9d545fb. There was 1 benchmark result with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 10 possible false positives for unstable benchmarks that are known to sometimes produce them. |
… encoding fuzzer (apache#49919) ### Rationale for this change The Parquet encoding fuzzer can allocate a std::vector of an arbitrary size. This can produce OOMs in the fuzzer. Issue found by OSS-Fuzz: https://issues.oss-fuzz.com/issues/506741109 ### What changes are included in this PR? 1. Use `arrow::stl::allocator` to delegate `std::vector` allocations to the fuzzing memory pool 2. Catch any `std::vector` allocation exceptions and convert them to regular Status errors ### Are these changes tested? Yes, by new regression file. ### Are there any user-facing changes? No. * GitHub Issue: apache#49918 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
Rationale for this change
The Parquet encoding fuzzer can allocate a std::vector of an arbitrary size. This can produce OOMs in the fuzzer.
Issue found by OSS-Fuzz: https://issues.oss-fuzz.com/issues/506741109
What changes are included in this PR?
arrow::stl::allocatorto delegatestd::vectorallocations to the fuzzing memory poolstd::vectorallocation exceptions and convert them to regular Status errorsAre these changes tested?
Yes, by new regression file.
Are there any user-facing changes?
No.