Skip to content

Segfault when used in cargo test #364

Closed
@gmorenz

Description

@gmorenz

Seems to be slightly intermittent, changing the code will randomly "fix"/unfix the issue. Using version 0.13.0 from crates.io.

Testcase:

extern crate glfw;

#[test]
fn test() {
    glfw::init(glfw::FAIL_ON_ERRORS).unwrap();
}

cargo test output

   Compiling raytracer v0.1.0 (file:///home/normal/raytracer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.54 secs
     Running target/debug/deps/raytracer-9ee32f3ce5c79175

running 1 test
test test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

error: process didn't exit successfully: `/home/normal/raytracer/target/debug/deps/raytracer-9ee32f3ce5c79175` (signal: 11, SIGSEGV: invalid memory reference)

To learn more, run the command again with --verbose.

Backtrace (via coredump, can't reproduce when running in gdb)

#0  0x00007fb3061f2150 in ?? ()
#1  0x00007fb30c3ed429 in __nptl_deallocate_tsd.part.4 () from /usr/lib/libpthread.so.0
#2  0x00007fb30c3ee498 in start_thread () from /usr/lib/libpthread.so.0
#3  0x00007fb30bf1854f in clone () from /usr/lib/libc.so.6

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