diff options
| author | Ramon de C Valle <rcvalle@users.noreply.github.com> | 2024-02-01 13:16:30 -0800 |
|---|---|---|
| committer | Ramon de C Valle <rcvalle@users.noreply.github.com> | 2024-03-01 18:50:40 -0800 |
| commit | dee4e02102197adc29be9bf98083297dd3f5e2ed (patch) | |
| tree | 510d1bc6652086782ea25e69a0a0b2a985f623aa /tests/codegen | |
| parent | eaee1e9453bfb4e1fb3753aa37450bb47cd7629d (diff) | |
| download | rust-dee4e02102197adc29be9bf98083297dd3f5e2ed.tar.gz rust-dee4e02102197adc29be9bf98083297dd3f5e2ed.zip | |
Add initial support for DataFlowSanitizer
Adds initial support for DataFlowSanitizer to the Rust compiler. It currently supports `-Zsanitizer-dataflow-abilist`. Additional options for it can be passed to LLVM command line argument processor via LLVM arguments using `llvm-args` codegen option (e.g., `-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/sanitizer/dataflow-instrument-functions.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/codegen/sanitizer/dataflow-instrument-functions.rs b/tests/codegen/sanitizer/dataflow-instrument-functions.rs new file mode 100644 index 00000000000..69c3560882c --- /dev/null +++ b/tests/codegen/sanitizer/dataflow-instrument-functions.rs @@ -0,0 +1,10 @@ +// Verifies that functions are instrumented. +// +//@ needs-sanitizer-dataflow +//@ compile-flags: -Copt-level=0 -Zsanitizer=dataflow + +#![crate_type="lib"] + +pub fn foo() { +} +// CHECK: define{{.*}}foo{{.*}}.dfsan |
