wgtmac commented on PR #961:
URL: https://github.com/apache/iceberg-cpp/pull/961#issuecomment-6187235791

   Addressed the test issue raised above by moving the length guard into an 
internal `HashBytes(const uint8_t*, size_t)` overload and keeping 
`BucketUtils::HashBytes(std::span)` as a thin wrapper. 
`HashBytesRejectsOversizedInput` now passes a null pointer with the oversized 
length, so it no longer builds a `std::span` covering more bytes than the 
object provides (undefined behavior per [span.cons]); the production guard and 
the error message are unchanged.
   
   Also documented on `HashBytes`/`BucketIndex` that inputs larger than 
`INT32_MAX` throw `IcebergError`, which the public header previously did not 
mention.
   
   Verified locally: both changed translation units compile with warnings as 
errors, and `BucketUtilsTest.*` passes (3/3) in a test binary linked from the 
new head.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to