Repository navigation
Commit e0979e8
Allocate default-sized offset buffer to avoid validate-then-write regression
(valueCount + 1) * OFFSET_WIDTH produces a 4-byte buffer for valueCount=0,
which is too small when validateFull() triggers getFieldBuffers() before
the vector is populated — subsequent setVector() writes at index 4+ fail.
Use max(required, INITIAL_VALUE_ALLOCATION * OFFSET_WIDTH) to match the
default allocateNew() size. Use allocator.buffer() directly instead of
allocateOffsetBuffer() to avoid mutating offsetAllocationSizeInBytes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change-Id: Iccb00d4775b196f7978b34cbc98234f50ede370a1 parent 0d89f0a commit e0979e8
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| |||
0 commit comments