Skip to content

GH-49805: [C++][Parquet] Avoid unbounded temporary allocation in DeltaBitPackDecoder::DecodeArrow#49806

Merged
pitrou merged 1 commit intoapache:mainfrom
pitrou:gh49805-delta-bit-pack-std-vector
Apr 20, 2026
Merged

GH-49805: [C++][Parquet] Avoid unbounded temporary allocation in DeltaBitPackDecoder::DecodeArrow#49806
pitrou merged 1 commit intoapache:mainfrom
pitrou:gh49805-delta-bit-pack-std-vector

Conversation

@pitrou
Copy link
Copy Markdown
Member

@pitrou pitrou commented Apr 20, 2026

Rationale for this change

DeltaBitPackDecoder::DecodeArrow allocates a temporary std::vector for the entire range of decoded values. This is sub-optimal, and generates out-of-memory failures in the Parquet encoding fuzzer.

This issue was found by OSS-Fuzz: https://issues.oss-fuzz.com/issues/489941774

What changes are included in this PR?

We should instead use a fixed-size temporary buffer.

Are these changes tested?

Yes, by existing CI tests.

Are there any user-facing changes?

No.

…n DeltaBitPackDecoder::DecodeArrow

DeltaBitPackDecoder::DecodeArrow allocates a temporary std::vector for the entire range of decoded values.
This is sub-optimal, and generates out-of-memory failures in the Parquet encoding fuzzer.

We should instead use a fixed-size temporary buffer.

OSS-Fuzz issue: https://issues.oss-fuzz.com/issues/489941774
@pitrou pitrou marked this pull request as ready for review April 20, 2026 13:31
@pitrou pitrou requested a review from wgtmac as a code owner April 20, 2026 13:31
@github-actions github-actions bot added the awaiting review Awaiting review label Apr 20, 2026
@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Apr 20, 2026

@github-actions crossbow submit -g cpp

@pitrou pitrou requested a review from rok April 20, 2026 13:42
@github-actions
Copy link
Copy Markdown

Revision: 2728e8d

Submitted crossbow builds: ursacomputing/crossbow @ actions-eed82bf22a

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-debian-13-cpp-amd64 GitHub Actions
test-debian-13-cpp-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 20, 2026
@pitrou pitrou merged commit 07a0aa3 into apache:main Apr 20, 2026
48 of 50 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Apr 20, 2026
@pitrou pitrou deleted the gh49805-delta-bit-pack-std-vector branch April 20, 2026 16:16
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 07a0aa3.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants