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

free_cell_layout test fails on macOS #69

Closed
RReverser opened this issue Nov 29, 2018 · 1 comment
Closed

free_cell_layout test fails on macOS #69

RReverser opened this issue Nov 29, 2018 · 1 comment

Comments

@RReverser
Copy link
Member

Summary

Running cargo test on a library code with either stable or nightly Rust fails on macOS Mojave.

Steps to Reproduce

  • First clone this repository that uses wee_alloc: ..............
  • cd $REPO/wee_alloc
  • cargo test

Actual Results

---- free_cell_layout stdout ----
thread 'free_cell_layout' panicked at 'assertion failed: `(left == right)`
  left: `Bytes(17)`,
 right: `Bytes(24)`: Safety and correctness depends on FreeCell being only one word larger than CellHeader', wee_alloc/src/lib.rs:345:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:221
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:476
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:390
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:325
   7: core::char::methods::<impl char>::escape_debug
             at src/libcore/panicking.rs:77
   8: wee_alloc::free_cell_layout
             at wee_alloc/src/lib.rs:345
   9: wee_alloc::free_cell_layout::{{closure}}
             at wee_alloc/src/lib.rs:344
  10: core::ops::function::FnOnce::call_once
             at /rustc/b68fc18c45350e1cdcd83cecf0f12e294e55af56/src/libcore/ops/function.rs:238
  11: <F as alloc::boxed::FnBox<A>>::call_box
             at src/libtest/lib.rs:1471
             at /rustc/b68fc18c45350e1cdcd83cecf0f12e294e55af56/src/libcore/ops/function.rs:238
             at /rustc/b68fc18c45350e1cdcd83cecf0f12e294e55af56/src/liballoc/boxed.rs:673
  12: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:102

Expected Results

All tests passing.

@RReverser
Copy link
Member Author

RReverser commented Nov 29, 2018

Looks like the test itself is wrong (it says it expects size to be one word larger, but actually adds one byte).

This was referenced Nov 29, 2018
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