`GenericByteBuilder` can be left in invalid state on panic

オープン
#12,411 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Surajsuthar がすでに取り組んでいます。

2026年11月23日 から。

  • #12444 @Surajsuthar による — オープン

評価

この issue はまだ評価されていません。

説明

bug
Describe the bug

Append methods call next_offset(), which can panic on overflow. If a caller catch unwinds this panic, it can leave the builder in an invalid state. For example:

https://github.com/apache/arrow-rs/blob/ab4af8a20c7304b23f7157c665140407c3369621/arrow-array/src/builder/generic_bytes_builder.rs#L101-L106

  • It appends to values & nulls, but if offsets fails due to overflow, and catch unwind happens, builder is in invalid state
To Reproduce

No response

Expected behavior

Look through the methods, and try to see if we can change them to ensure any panics/failures happens upfront before modifying the builder

Additional context

Not a high priority, this seems a niche case

Willingness to contribute

None

主要言語
Rust
スター
3.7k
フォーク
1.5k
平均マージ
2日 16時間
マージ済み PR(30日)
183

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/arrow-rs のほかの issue

apache/arrow-rs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。