File tree Expand file tree Collapse file tree 3 files changed +16
-18
lines changed
tests/run-make/sanitizer-dylib-link Expand file tree Collapse file tree 3 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,6 @@ run-make/reproducible-build-2/Makefile
7070run-make/reproducible-build/Makefile
7171run-make/rlib-format-packed-bundled-libs-2/Makefile
7272run-make/rlib-format-packed-bundled-libs/Makefile
73- run-make/sanitizer-cdylib-link/Makefile
74- run-make/sanitizer-dylib-link/Makefile
7573run-make/sanitizer-staticlib-link/Makefile
7674run-make/share-generics-dylib/Makefile
7775run-make/simd-ffi/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // This test builds a shared object, then an executable that links it as a native
2+ // rust library (contrast to an rlib). The shared library and executable both
3+ // are compiled with address sanitizer, and we assert that a fault in the dylib
4+ // is correctly detected.
5+ // See https://github.com/rust-lang/rust/pull/38699
6+
7+ //@ needs-sanitizer-support
8+ //@ needs-sanitizer-address
9+
10+ use run_make_support:: { run_fail, rustc} ;
11+
12+ fn main ( ) {
13+ rustc ( ) . arg ( "-g" ) . arg ( "-Zsanitizer=address" ) . crate_type ( "dylib" ) . input ( "library.rs" ) . run ( ) ;
14+ rustc ( ) . arg ( "-g" ) . arg ( "-Zsanitizer=address" ) . crate_type ( "bin" ) . input ( "program.rs" ) . run ( ) ;
15+ run_fail ( "program" ) . assert_stderr_contains ( "stack-buffer-overflow" ) ;
16+ }
You can’t perform that action at this time.
0 commit comments