diff options
| author | bors <bors@rust-lang.org> | 2025-06-21 10:03:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-21 10:03:08 +0000 |
| commit | 6d0c9e2a1c80e350c50f5fb9338ea9e585ec603b (patch) | |
| tree | 36dc2d25a897caa9da2b2a044c52b3e2af56ed93 /tests/codegen | |
| parent | df4ad9e28b9fb973e244ebc65a8167a261b8f45e (diff) | |
| parent | 4e87031f2e08aef783be206b283923bf49f08ff2 (diff) | |
| download | rust-6d0c9e2a1c80e350c50f5fb9338ea9e585ec603b.tar.gz rust-6d0c9e2a1c80e350c50f5fb9338ea9e585ec603b.zip | |
Auto merge of #142817 - matthiaskrgr:rollup-mrobovy, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#142502 (rustdoc_json: improve handling of generic args)
- rust-lang/rust#142597 (error on calls to ABIs that cannot be called)
- rust-lang/rust#142785 (fix(linkcheck): Build using the lockfile)
- rust-lang/rust#142787 (Add diagnostic items for Clippy)
- rust-lang/rust#142788 (add doc(alias("AsciiChar")) to core::ascii::Char)
- rust-lang/rust#142801 (Use gen blocks in the compiler instead of `from_coroutine`)
- rust-lang/rust#142804 (Rename `LayoutS` to `LayoutData` in comments)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/naked-asan.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/codegen/naked-asan.rs b/tests/codegen/naked-asan.rs index 223c41b15bb..46218cf79d6 100644 --- a/tests/codegen/naked-asan.rs +++ b/tests/codegen/naked-asan.rs @@ -1,22 +1,28 @@ -// Make sure we do not request sanitizers for naked functions. +//@ add-core-stubs +//@ needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu -Zsanitizer=address -Ctarget-feature=-crt-static -//@ only-x86_64 -//@ needs-sanitizer-address -//@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static +// Make sure we do not request sanitizers for naked functions. #![crate_type = "lib"] +#![feature(no_core)] #![no_std] +#![no_core] #![feature(abi_x86_interrupt)] +extern crate minicore; +use minicore::*; + +#[no_mangle] pub fn caller() { - page_fault_handler(1, 2); + unsafe { asm!("call {}", sym page_fault_handler) } } -// CHECK: declare x86_intrcc void @page_fault_handler(ptr {{.*}}, i64{{.*}}){{.*}}#[[ATTRS:[0-9]+]] +// CHECK: declare x86_intrcc void @page_fault_handler(){{.*}}#[[ATTRS:[0-9]+]] #[unsafe(naked)] #[no_mangle] -pub extern "x86-interrupt" fn page_fault_handler(_: u64, _: u64) { - core::arch::naked_asm!("ud2") +pub extern "x86-interrupt" fn page_fault_handler() { + naked_asm!("ud2") } // CHECK: #[[ATTRS]] = |
