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

Re: [I] [C++] binary_slice with its default `stop` raises "Negative buffer resize" [arrow]

singhpratech commented on issue #51222:
URL: https://github.com/apache/arrow/issues/51222#issuecomment-5579337479

   The overflow is in `SliceBytesTransform::MaxCodeunits` (scalar_string_ascii.cc on main):
   `(opt.stop - opt.start + opt.step - 1) / opt.step` with the default `stop` of
   `numeric_limits<int64_t>::max()` wraps negative when `start > 0`, and that negative bound is what
   becomes "Negative buffer resize". #36575 fixed the same expression for `utf8_slice_codeunits`;
   the byte-slice transform still has the original form.
   


-- 
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