about summary refs log tree commit diff
path: root/tests/ui/sanitize
AgeCommit message (Collapse)AuthorLines
2024-02-29Move sanitizer ui tests to sanitizer directoryRamon de C Valle-644/+0
Moves the sanitizer ui tests to the sanitizer directory and removes the sanitizer prefix from tests file names similarly to how the sanitizer codegen tests are organized.
2024-02-27CFI: Fix typo in test file namesRamon de C Valle-0/+0
Fixes typo (i.e., saniziter) in test file names.
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-146/+146
2024-01-03Enable address sanitizer for MSVC targets using INFERASANLIBS linker flagDaniel Paoliello-1/+1
2023-12-23Add missing CFI sanitizer cfgs feature gateUrgau-0/+4
2023-11-27Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviperbors-2/+0
Update the minimum external LLVM to 16. With this change, we'll have stable support for LLVM 16 and 17. For reference, the previous increase to LLVM 15 was #114148 [Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
2023-11-24Show number in error message even for one errorNilstrieb-10/+10
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-21Update the minimum external LLVM to 16.Dario Nieuwenhuis-2/+0
2023-10-20Rename lots of files that had `generator` in their nameOli Scherer-0/+0
2023-10-20s/Generator/Coroutine/Oli Scherer-1/+1
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+4
2023-09-22Fix test on targets with crt-static defaultTomasz Miąsko-1/+2
2023-09-11Use no_core for KCFI tests to exercise them in CITomasz Miąsko-5/+16
2023-09-08Fix sanitize/cfg.rs testTomasz Miąsko-8/+8
* Move needs-sanitizer conditions to specific revisions that require them (otherwise the conditions are mutually exclusive with needs-sanitizer-kcfi and test is always ignored). * Add missing revisions
2023-08-10fix #114275lena-0/+15
this ICE was caused by `transform_ty` in compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs encountering an unevaluated const, while expecting it to already be evaluated. add a regression test Update tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs Co-authored-by: Michael Goulet <michael@errs.io> Update tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs Co-authored-by: Michael Goulet <michael@errs.io> fix test compiling for targets with -crt-static and failing this was causign https://github.com/rust-lang/rust/pull/114686 to fail
2023-08-08Rollup merge of #113593 - rcvalle:rust-cfi-fix-90546, r=wesleywiserMatthias Krüger-4/+16
CFI: Fix error compiling core with LLVM CFI enabled Fix #90546 by filtering out global value function pointer types from the type tests, and adding the LowerTypeTests pass to the rustc LTO optimization pipelines.
2023-08-07CFI: Fix error compiling core with LLVM CFI enabledRamon de C Valle-4/+16
Fix #90546 by filtering out global value function pointer types from the type tests, and adding the LowerTypeTests pass to the rustc LTO optimization pipelines.
2023-07-05don't try to cross-compile sanitizer testsjyn-1/+6
this was a pre-existing latent bug, we just didn't have any CI builders exercising it. fixes the following errors: ``` ---- [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt1 stdout ---- error in revision `opt1`: test compilation failed although it shouldn't! status: exit status: 1 command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=i686-unknown-linux-gnu" "--cfg" "opt1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=x86_64-linux-gnu-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/auxiliary" "-Zsanitizer=address" "-Clto=thin" "-Copt-level=1" --- stderr ------------------------------- error: linking with `x86_64-linux-gnu-gcc` failed: exit status: 1 = note: x86_64-linux-gnu-gcc: error: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib/librustc-nightly_rt.asan.a: No such file or directory failures: [ui] tests/ui/sanitize/badfree.rs [ui] tests/ui/sanitize/address.rs [ui] tests/ui/sanitize/use-after-scope.rs [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt0 [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt1 ```
2023-06-01CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(BindeRamon de C Valle-0/+17
Fixes #111184 by encoding ty::Generator parent substs only.
2023-05-03Add cross-language LLVM CFI support to the Rust compilerRamon de C Valle-0/+137
This commit adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395). It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue #89653. Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto).
2023-02-14Add `kernel-address` sanitizer support for freestanding targetsWesley Norris-0/+28
2023-02-10Update the minimum external LLVM to 14Josh Stone-1/+0
2023-01-11Move /src/test to /testsAlbert Larsan-0/+413