`GenericByteBuilder` can be left in invalid state on panic

Aperta
#12,411 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Surajsuthar ci sta già lavorando.

Dal 23/11/2026.

  • #12444 di @Surajsuthar — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Rust
Stelle
3.7k
Fork
1.5k
Merge medio
2g 16h
PR unite (30g)
183

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-rs

Tutte le issue di apache/arrow-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.