Обновить tests/stack_overflow.rs

This commit is contained in:
2026-03-31 00:58:05 +03:00
parent 7e12873a3f
commit 225c62bf31

View File

@@ -20,12 +20,6 @@ pub extern "C" fn _start() -> ! {
panic!("Execution continued after stack overflow");
}
#[allow(unconditional_recursion)]
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
volatile::Volatile::new(0).read(); // prevent tail recursion optimizations
}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
amix::test_panic_handler(info)
@@ -56,3 +50,9 @@ extern "x86-interrupt" fn test_double_fault_handler(
exit_qemu(QemuExitCode::Success);
loop {}
}
#[allow(unconditional_recursion)]
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
volatile::Volatile::new(0).read(); // prevent tail recursion optimizations
}