Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_range panics due to misaligned pointer dereference in Rust 1.70+ #21

Closed
boydgreenfield opened this issue Oct 5, 2023 · 1 comment

Comments

@boydgreenfield
Copy link
Contributor

test bloom::test::test_bloom_filter ... ok
thread 'mmap_bitvec::test::test_bitvec_get_range' panicked at 'misaligned pointer dereference: address must be a multiple of 0x10 but is 0x102d70008', src/mmap_bitvec.rs:516:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'mmap_bitvec::test::test_bitvec_get_range' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:126:5
stack backtrace:
   0:        0x102a8b76c - std::backtrace_rs::backtrace::libunwind::trace::h0a647ce7e8dc2fab
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x102a8b76c - std::backtrace_rs::backtrace::trace_unsynchronized::hea920694a2a8ac80
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x102a8b76c - std::sys_common::backtrace::_print_fmt::h7b4e20c1da2ebb61
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
   3:        0x102a8b76c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h819e9cbdf1a9e730
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
   4:        0x102aa4974 - core::fmt::write::ha5e9bf3131ecb7c0
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
   5:        0x102a88bf8 - std::io::Write::write_fmt::h414ce9994bf17404
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
   6:        0x102a8b580 - std::sys_common::backtrace::_print::h28d98f2094da6d1d
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
   7:        0x102a8b580 - std::sys_common::backtrace::print::h8072db0bbd5bcc3d
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
   8:        0x102a8d134 - std::panicking::default_hook::{{closure}}::h2c85c5b0c2ede151
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
   9:        0x102a8cef4 - std::panicking::default_hook::hcf2f70992d02f6fe
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
  10:        0x102a61130 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h4e1aa1fb8cd42a85
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
  11:        0x102a61130 - test::test_main::{{closure}}::h3dac9aefecf8bd3c
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/test/src/lib.rs:134:21
  12:        0x102a8d748 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he07e730a14cc7476
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
  13:        0x102a8d748 - std::panicking::rust_panic_with_hook::h023af7f90b47eb8b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:695:13
  14:        0x102a8d500 - std::panicking::begin_panic_handler::{{closure}}::h14283519edc1d634
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:580:13
  15:        0x102a8bb8c - std::sys_common::backtrace::__rust_end_short_backtrace::hc366c0b0cef5b747
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
  16:        0x102a8d2d4 - rust_begin_unwind
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
  17:        0x102aaf52c - core::panicking::panic_nounwind_fmt::h48fca0782e5a5b33
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:96:14
  18:        0x102aaf5a8 - core::panicking::panic_nounwind::hc8dbc36c10163a33
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:126:5
  19:        0x102aaf6a0 - core::panicking::panic_cannot_unwind::h8bbe98643cda7e5c
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:188:5
  20:        0x102a214e0 - <mmap_bitvec::mmap_bitvec::MmapBitVec as mmap_bitvec::bitvec::BitVector>::get_range::h152b9838683ec0b1
                               at /Users/boyd/OC/mmap-bitvec/src/mmap_bitvec.rs:491:5
  21:        0x102a29d14 - mmap_bitvec::mmap_bitvec::test::test_bitvec_get_range::h0d74f3ad994d039c
                               at /Users/boyd/OC/mmap-bitvec/src/mmap_bitvec.rs:716:13
  22:        0x102a225a0 - mmap_bitvec::mmap_bitvec::test::test_bitvec_get_range::{{closure}}::hc175bca7eb24cc0f
                               at /Users/boyd/OC/mmap-bitvec/src/mmap_bitvec.rs:703:32
  23:        0x102a265ec - core::ops::function::FnOnce::call_once::h1ffe4f16dc2ea92e
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
  24:        0x102a65094 - core::ops::function::FnOnce::call_once::hf57ab7414346cd3e
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
  25:        0x102a65094 - test::__rust_begin_short_backtrace::h8906971520158b86
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/test/src/lib.rs:655:18
  26:        0x102a640c4 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h11f245024fa107de
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
  27:        0x102a640c4 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h63f566e6242f22d7
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panic/unwind_safe.rs:271:9
  28:        0x102a640c4 - std::panicking::try::do_call::ha521304254b2b8a6
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  29:        0x102a640c4 - std::panicking::try::h781279c66bc65dea
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  30:        0x102a640c4 - std::panic::catch_unwind::h62f2c0243d7355ff
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  31:        0x102a640c4 - test::run_test_in_process::h8be0dc8553a2d668
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/test/src/lib.rs:678:27
  32:        0x102a640c4 - test::run_test::run_test_inner::{{closure}}::h3c1fd2f20901e638
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/test/src/lib.rs:572:39
  33:        0x102a36e70 - test::run_test::run_test_inner::{{closure}}::ha0406b263a72cd5b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/test/src/lib.rs:599:37
  34:        0x102a36e70 - std::sys_common::backtrace::__rust_begin_short_backtrace::h01f0c6c7a98e3e15
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:134:18
  35:        0x102a3b924 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h160acb161c6a735a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/thread/mod.rs:526:17
  36:        0x102a3b924 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h9ccec8dfc8841d99
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panic/unwind_safe.rs:271:9
  37:        0x102a3b924 - std::panicking::try::do_call::h554d349d895c285b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  38:        0x102a3b924 - std::panicking::try::hafe9b48954d647a5
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  39:        0x102a3b924 - std::panic::catch_unwind::h05668823152b5e98
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  40:        0x102a3b924 - std::thread::Builder::spawn_unchecked_::{{closure}}::ha9617bcc6788886f
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/thread/mod.rs:525:30
  41:        0x102a3b924 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf7dcd4587efbbfa3
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
  42:        0x102a913e8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd96d02f907263858
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
  43:        0x102a913e8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfd80494da4543cfb
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
  44:        0x102a913e8 - std::sys::unix::thread::Thread::new::thread_start::h7f56b35fafcfec87
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys/unix/thread.rs:108:17
  45:        0x1968cbfa8 - __pthread_joiner_wake
thread caused non-unwinding panic. aborting.
error: test failed, to rerun pass `--lib`

See also onecodex/rust-bfield#20 for discussion of the issue.

@boydgreenfield
Copy link
Contributor Author

Closed in #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant