You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/07/04 00:33:10 UTC

[PR] fix: guard multiBufferBuilder UnsafeAppend against short copy [arrow-go]

fallintoplace opened a new pull request, #896:
URL: https://github.com/apache/arrow-go/pull/896

   ## Summary\n- fix(array): add explicit runtime guard in multiBufferBuilder.UnsafeAppend to panic when copy writes fewer bytes than expected\n- keep existing debug assertion for shorter-copy conditions\n- add regression test to ensure truncated append panics and prevents silent data corruption\n\n## Testing\n- Not run (single defensive-path fix).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: guard multiBufferBuilder UnsafeAppend against short copy [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #896:
URL: https://github.com/apache/arrow-go/pull/896


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: guard multiBufferBuilder UnsafeAppend against short copy [arrow-go]

Posted by "fallintoplace (via GitHub)" <gi...@apache.org>.
fallintoplace commented on PR #896:
URL: https://github.com/apache/arrow-go/pull/896#issuecomment-4880017497

   ## Improved summary
   - Fix scope: multiBufferBuilder.UnsafeAppend now validates that a value copy completed fully before proceeding.
   - Behavior change: if copy writes fewer bytes than the requested value length, we now fail fast (panic) instead of silently keeping a truncated value with inconsistent view metadata.
   - Why this matters: avoids silent data corruption in BinaryViewBuilder/StringViewBuilder out-of-line payloads where headers can reference bytes that were never written.
   - Coverage: added TestMultiBufferBuilderUnsafeAppendPanicsOnTruncatedCopy to lock this regression.
   - Risk: scoped change, and fail-fast here is preferable to corrupted output.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: guard multiBufferBuilder UnsafeAppend against short copy [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on PR #896:
URL: https://github.com/apache/arrow-go/pull/896#issuecomment-4883163780

   @fallintoplace gentle nudge — still blocked on the failing test: because `multiBufferBuilder.Reserve` rounds the block up to a multiple of 64, the 9-byte append into an 8-byte-requested block never short-copies, so `assert.Panics` fails (`Panic value: <nil>`). Details in my review above. Ping me and I'll re-review once it's updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: guard multiBufferBuilder UnsafeAppend against short copy [arrow-go]

Posted by "fallintoplace (via GitHub)" <gi...@apache.org>.
fallintoplace commented on PR #896:
URL: https://github.com/apache/arrow-go/pull/896#issuecomment-4880017363

   ## Improved summary\n- **Fix scope:**  now validates the full-value copy completes before updating view buffer state.\n- **Behavior change:** if  writes fewer than , the code panics instead of leaving a partially written view payload.\n- **Why:** prevents silent data corruption where  can describe a longer value than bytes actually stored.\n- **Coverage:** added  to pin this regression.\n- **Risk:** limited to view out-of-line append path; fail-fast is safer than silent corruption.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org