Jefffrey commented on PR #10932:
URL: https://github.com/apache/arrow-rs/pull/10932#issuecomment-5491922375

   seems like theres some real miri failures?
   
   ```sh
   
       running 1 test
       test buffer::immutable::tests::test_shrink_to_fit ... 
     stderr ───
       error: Undefined Behavior: trying to retag from <216778> for 
SharedReadOnly permission at alloc67519[0x10], but that tag does not exist in 
the borrow stack for this location
          --> arrow-buffer/src/buffer/immutable.rs:238:41
           |
       238 |                     let base = unsafe { (*self.bytes_ptr).as_ptr() 
};
           |                                         ^^^^^^^^^^^^^^^^^ this 
error occurs as part of retag at alloc67519[0x10..0x38]
           |
           = help: this indicates a potential bug in the program: it performed 
an invalid operation, but the Stacked Borrows rules it violated are still 
experimental
           = help: see 
https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md
 for further information
       help: <216778> was created by a SharedReadOnly retag at offsets 
[0x10..0x38]
          --> arrow-buffer/src/buffer/immutable.rs:249:28
           |
       249 |                 bytes_ptr: std::ptr::from_ref::<Bytes>(bytes),
           |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       help: <216778> was later invalidated at offsets [0x10..0x38] by a Unique 
function-entry retag inside this call
          --> arrow-buffer/src/buffer/immutable.rs:253:13
           |
       253 |             bytes.try_realloc(desired_capacity).ok();
           |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           = note: this is on thread `buffer::immutab`
           = note: stack backtrace:
                   0: <buffer::immutable::Buffer::shrink_to_fit::PtrSync<'_> as 
std::ops::Drop>::drop
                       at arrow-buffer/src/buffer/immutable.rs:238:41: 238:58
                   1: 
std::ptr::drop_glue::<buffer::immutable::Buffer::shrink_to_fit::PtrSync<'_>> - 
shim(Some(buffer::immutable::Buffer::shrink_to_fit::PtrSync<'_>))
                       at 
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:848:1:
 850:25
                   2: buffer::immutable::Buffer::shrink_to_fit
                       at arrow-buffer/src/buffer/immutable.rs:254:9: 254:10
                   3: buffer::immutable::tests::test_shrink_to_fit
                       at arrow-buffer/src/buffer/immutable.rs:761:9: 761:31
                   4: buffer::immutable::tests::test_shrink_to_fit::{closure#0}
                       at arrow-buffer/src/buffer/immutable.rs:750:28: 750:28
   ```
   
   ```sh
   
       running 1 test
       test test_shrink_to_fit_after_concat ... 
     stderr ───
       error: Undefined Behavior: trying to retag from <2246064> for 
SharedReadOnly permission at alloc720449[0x10], but that tag does not exist in 
the borrow stack for this location
        --> arrow-buffer/src/buffer/immutable.rs:238:40
         |
         = note: this error occurs as part of retag at alloc720449[0x10..0x38]
         |
         = help: this indicates a potential bug in the program: it performed an 
invalid operation, but the Stacked Borrows rules it violated are still 
experimental
         = help: see 
https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md
 for further information
       help: <2246064> was created by a SharedReadOnly retag at offsets 
[0x10..0x38]
        --> arrow-buffer/src/buffer/immutable.rs:249:27
       help: <2246064> was later invalidated at offsets [0x10..0x38] by a 
Unique function-entry retag inside this call
        --> arrow-buffer/src/buffer/immutable.rs:253:12
         = note: this is on thread `test_shrink_to_`
         = note: stack backtrace:
                 0: <arrow::buffer::Buffer::shrink_to_fit::PtrSync<'_> as 
std::ops::Drop>::drop
                     at arrow-buffer/src/buffer/immutable.rs:238:41: 238:58
                 1: 
std::ptr::drop_glue::<arrow::buffer::Buffer::shrink_to_fit::PtrSync<'_>> - 
shim(Some(arrow::buffer::Buffer::shrink_to_fit::PtrSync<'_>))
                     at 
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:848:1:
 850:25
                 2: arrow::buffer::Buffer::shrink_to_fit
                     at arrow-buffer/src/buffer/immutable.rs:254:9: 254:10
                 3: arrow::buffer::ScalarBuffer::<i32>::shrink_to_fit
                     at arrow-buffer/src/buffer/scalar.rs:111:9: 111:36
                 4: arrow::buffer::OffsetBuffer::<i32>::shrink_to_fit
                     at arrow-buffer/src/buffer/offset.rs:250:9: 250:31
                 5: <arrow::array::GenericListArray<i32> as 
arrow::array::Array>::shrink_to_fit
                     at arrow-array/src/array/list_array.rs:626:9: 626:43
                 6: <std::sync::Arc<(dyn arrow::array::Array + 'static)> as 
arrow::array::Array>::shrink_to_fit
                     at arrow-array/src/array/mod.rs:481:13: 481:32
                 7: test_shrink_to_fit_after_concat::{closure#1}
                     at arrow/tests/shrink_to_fit.rs:47:13: 47:41
                 8: memory_use::<std::sync::Arc<dyn arrow::array::Array>, 
{closure@arrow/tests/shrink_to_fit.rs:45:20: 45:22}>
                     at arrow/tests/shrink_to_fit.rs:155:15: 155:20
                 9: test_shrink_to_fit_after_concat
                     at arrow/tests/shrink_to_fit.rs:45:9: 49:11
                 10: test_shrink_to_fit_after_concat::{closure#0}
                     at arrow/tests/shrink_to_fit.rs:26:37: 26:37
   ```


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