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

   ## Which issue does this PR close?
   
   Closes #3499.
   
   ## Rationale for this change
   
   The Miri CI workflow on `main` is failing with undefined behavior in 
`test_append_null_struct_field_to_struct_builder`. Additionally, Miri was 
disabled on PR builds due to an upstream cargo nightly regression that has 
since been resolved.
   
   ## What changes are included in this PR?
   
   - Add bounds-checking `debug_assert` in `SparkUnsafeRow::get_element_offset` 
to catch out-of-bounds element accesses early
   - Fix `test_append_null_struct_field_to_struct_builder`: the test buffer was 
only 8 bytes (just the null bitset with no field value slot) and the null bit 
was unset, so `append_field` treated the field as non-null and attempted to 
read 8 bytes past the end of the buffer. Fixed to use 16 bytes with bit 0 set 
to properly represent a null field.
   - Re-enable Miri on `pull_request` trigger now that the upstream cargo 
nightly regression is resolved
   
   ## How are these changes tested?
   
   The existing `test_append_null_struct_field_to_struct_builder` test is the 
fix itself — it was the source of the Miri UB. The debug assertion will cause a 
panic in debug/test builds if any future test constructs an undersized row 
buffer.


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