lxy-9602 opened a new pull request, #514:
URL: https://github.com/apache/paimon-cpp/pull/514

   <!-- PR titles must follow Conventional Commits: <type>(<optional-scope>): 
<description> -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Empty string keys trigger UBSan reports when `MemorySlice::CopyBytes()` 
passes null pointers to `memcpy`, even when the copy length is zero.
   
   Skip zero-length copies in:
   - `MemorySlice::CopyBytes()`
   - `MemorySegment::GetOrCreateHeapMemory()`
   - Both `ByteArrayInputStream::Read()` overloads
   
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   Added regression coverage:
   - `MemorySliceTest.TestSliceCopyEmptyBytes`
   - `MemorySegmentTest.TestGetOrCreateHeapMemoryForEmptySegment`
   - `ByteArrayInputStreamTest.TestZeroLengthRead`
   - `ByteArrayInputStreamTest.TestZeroLengthReadFromEmptyStream`
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API in include dir or storage format or 
protocol -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   
   ### Generative AI tooling
   Generated-by: OpenAI Codex (GPT-6)
   <!--
   If generative AI tooling has been used in the process of authoring this 
patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   


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

Reply via email to