mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #75224 - Aaron1011:fix/function-arguments-naked, r=Amanieu
Don't call a function in function-arguments-naked.rs Fixes #75096 It's U.B. to use anything other than inline assmebling in a naked function. Fortunately, the `#break` directive works fine without anything in the function body.
This commit is contained in:
commit
f5d2ffd7fb
@ -3,6 +3,9 @@
|
||||
// We have to ignore android because of this issue:
|
||||
// https://github.com/rust-lang/rust/issues/74847
|
||||
// ignore-android
|
||||
//
|
||||
// We need to use inline assembly, so just use one platform
|
||||
// only-x86_64
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
@ -24,6 +27,7 @@
|
||||
// lldb-command:continue
|
||||
|
||||
|
||||
#![feature(asm)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(omit_gdb_pretty_printer_section)]
|
||||
#![omit_gdb_pretty_printer_section]
|
||||
@ -33,8 +37,6 @@ fn main() {
|
||||
}
|
||||
|
||||
#[naked]
|
||||
fn naked(x: usize, y: usize) {
|
||||
zzz(); // #break
|
||||
extern "C" fn naked(x: usize, y: usize) {
|
||||
unsafe { asm!("ret"); } // #break
|
||||
}
|
||||
|
||||
fn zzz() { () }
|
||||
|
Loading…
Reference in New Issue
Block a user