File tree 3 files changed +16
-18
lines changed
tests/run-make/sanitizer-dylib-link
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
70
70
run-make/reproducible-build/Makefile
71
71
run-make/rlib-format-packed-bundled-libs-2/Makefile
72
72
run-make/rlib-format-packed-bundled-libs/Makefile
73
- run-make/sanitizer-cdylib-link/Makefile
74
- run-make/sanitizer-dylib-link/Makefile
75
73
run-make/sanitizer-staticlib-link/Makefile
76
74
run-make/share-generics-dylib/Makefile
77
75
run-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