We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2c290e commit dd4d6a9Copy full SHA for dd4d6a9
src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile
@@ -10,6 +10,9 @@
10
11
all:
12
$(RUSTC) -g -Z sanitizer=address --crate-type staticlib --target $(TARGET) library.rs
13
+ # Verify that linking without sanitizer fails, i.e., runtime is not part of staticlib:
14
+ $(RUSTC) -g --crate-type bin --target $(TARGET) -L . program.rs && exit 1 || true
15
+ # Verify that linking with sanitizer succeeds and detects overflow in library:
16
$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -L . program.rs
17
$(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow
18
0 commit comments