andygrove opened a new pull request, #3655:
URL: https://github.com/apache/datafusion-comet/pull/3655

   ## Summary
   - Add `debug_assert!` statements between SAFETY comments and `unsafe` blocks 
throughout the native Rust code
   - Assertions catch precondition violations during development/testing (null 
pointers, out-of-bounds indices, uninitialized globals, alignment, negative 
sizes)
   - Zero runtime cost in release builds
   
   ## Files changed
   - `native/core/src/execution/shuffle/spark_unsafe/row.rs` — pointer null 
checks on all accessor methods, row initialization checks, loop bounds checks
   - `native/core/src/execution/shuffle/spark_unsafe/list.rs` — address 
validity and index bounds checks
   - `native/core/src/execution/shuffle/spark_unsafe/map.rs` — address and size 
validity checks
   - `native/core/src/execution/jni_api.rs` — address, size, and alignment 
checks for sort partition
   - `native/core/src/execution/utils.rs` — pointer alignment checks before 
aligned writes
   - `native/core/src/jvm_bridge/mod.rs` — initialization checks before 
`get_unchecked()` calls
   
   ## Test plan
   - [x] `cargo clippy --all-targets --workspace -- -D warnings` passes with no 
warnings
   - Assertions are `debug_assert!` only, so no impact on release builds


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