about summary refs log tree commit diff
path: root/tests/ui/sanitizer/asan_odr_windows.rs
blob: b638d6eb9694cd8b70f15ddb16001937717190cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Check that crates can be linked together with `-Z sanitizer=address` on msvc.
//! See <https://github.com/rust-lang/rust/issues/124390>.

//@ run-pass
//@ compile-flags:-Zsanitizer=address -C unsafe-allow-abi-mismatch=sanitizer
//@ aux-build: asan_odr_win-2.rs
//@ only-windows-msvc
//@ needs-sanitizer-support
//@ needs-sanitizer-address

extern crate othercrate;

fn main() {
    let result = std::panic::catch_unwind(|| {
        println!("hello!");
    });
    assert!(result.is_ok());

    othercrate::exposed_func();
}