Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Conversation

@haileys
Copy link

@haileys haileys commented Mar 9, 2021

Tests currently fail on master on latest Rust with this error:

failures:

---- tree_bitmap::tests::remove stdout ----
thread 'tree_bitmap::tests::remove' panicked at 'attempted to zero-initialize type `&str`, which is invalid', /home/charlie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:625:9

---- tree_bitmap::tests::len stdout ----
thread 'tree_bitmap::tests::len' panicked at 'attempted to zero-initialize type `&str`, which is invalid', /home/charlie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:625:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This pull request replaces ptr::write and mem::zeroed with ptr::write_bytes to avoid creating a real object (or reference to such) for which zeroed bytes are invalid.

hrefhref added a commit to hrefhref/routing_table that referenced this pull request Nov 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant