Skip to content

issue-5917 test fails with "dangling pointer was dereferenced" #326

@dwrensha

Description

@dwrensha
$ rustc --version
rustc 1.22.0-nightly (f861b6ee4 2017-09-01)
$ cargo run --bin miri ~/src/seer/tests/run-pass/issue-5917.rs 
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/miri /home/dwrensha/src/seer/tests/run-pass/issue-5917.rs`
error: dangling pointer was dereferenced
  --> /home/dwrensha/src/seer/tests/run-pass/issue-5917.rs:16:5
   |
16 |     assert_eq!(v[0], 5);
   |     ^^^^^^^^^^^^^^^^^^^^
   |
note: inside call to main
  --> /home/dwrensha/src/seer/tests/run-pass/issue-5917.rs:14:1
   |
14 | / pub fn main () {
15 | |     let T(ref v) = STATIC;
16 | |     assert_eq!(v[0], 5);
17 | | }
   | |_^
   = note: this error originates in a macro outside of the current crate

error: aborting due to previous error

thread 'main' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:525:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions