34 files changed +13
-41
lines changed Original file line number Diff line number Diff line change 4
4
5
5
//! Unwinding past the top frame of a stack is Undefined Behavior.
6
6
7
- #![ feature( c_unwind) ]
8
-
9
7
use std:: { mem, ptr} ;
10
8
11
9
extern "C-unwind" fn thread_start ( _null : * mut libc:: c_void ) -> * mut libc:: c_void {
Original file line number Diff line number Diff line change 1
1
//@compile-flags: -Zmiri-disable-abi-check
2
- #![ feature( c_unwind) ]
3
2
4
3
#[ no_mangle]
5
4
extern "C-unwind" fn unwind ( ) {
Original file line number Diff line number Diff line change 4
4
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
5
5
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
6
6
//@[definition,both]error-in-other-file: aborted execution
7
- #![ feature( rustc_attrs, c_unwind ) ]
7
+ #![ feature( rustc_attrs) ]
8
8
9
9
#[ cfg_attr( any( definition, both) , rustc_nounwind) ]
10
10
#[ no_mangle]
Original file line number Diff line number Diff line change 1
1
//@compile-flags: -Zmiri-disable-abi-check
2
2
// This feature is required to trigger the error using the "C" ABI.
3
- #![ feature( c_unwind) ]
4
3
5
4
extern "C" {
6
5
fn miri_start_panic ( payload : * mut u8 ) -> !;
Original file line number Diff line number Diff line change 1
- #![ feature( c_unwind) ]
2
-
3
1
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB.
4
2
5
3
extern "C-unwind" fn unwind ( ) {
Original file line number Diff line number Diff line change 7
7
// Enable MIR inlining to ensure that `TerminatorKind::UnwindTerminate` is generated
8
8
// instead of just `UnwindAction::Terminate`.
9
9
10
- #![ feature( c_unwind) ]
11
-
12
10
struct Foo ;
13
11
14
12
impl Drop for Foo {
Original file line number Diff line number Diff line change 3
3
//@normalize-stderr-test: "\| +\^+" -> "| ^"
4
4
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
5
5
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
6
- #![ feature( c_unwind) ]
7
-
8
6
extern "C" fn panic_abort ( ) {
9
7
panic ! ( )
10
8
}
Original file line number Diff line number Diff line change 2
2
// found in this form" errors works without `-C prefer-dynamic` (`panic!` calls foreign function
3
3
// `__rust_start_panic`).
4
4
// no-prefer-dynamic
5
- #![ feature( c_unwind , unboxed_closures) ]
5
+ #![ feature( unboxed_closures) ]
6
6
7
7
use std:: panic;
8
8
Original file line number Diff line number Diff line change 14
14
// ignore-loongarch64 FIXME
15
15
16
16
#![ crate_type = "lib" ]
17
- #![ feature( c_unwind) ]
18
17
19
18
extern "C" {
20
19
fn bar ( ) ;
Original file line number Diff line number Diff line change 4
4
5
5
#![ crate_type = "lib" ]
6
6
#![ feature( c_variadic) ]
7
- #![ feature( c_unwind) ]
8
7
#![ no_std]
9
8
use core:: ffi:: VaList ;
10
9
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: arm
2
2
// compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 4
4
// when the code is compiled with `panic=abort`.
5
5
6
6
#![ crate_type = "lib" ]
7
- #![ feature( c_unwind) ]
8
7
9
8
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
10
9
#[ no_mangle]
Original file line number Diff line number Diff line change 6
6
// to prevent LLVM from inferring the attribute.
7
7
8
8
#![ crate_type = "lib" ]
9
- #![ feature( c_unwind) ]
10
9
11
10
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
12
11
#[ no_mangle]
Original file line number Diff line number Diff line change 6
6
// disable optimizations above to prevent LLVM from inferring the attribute.
7
7
8
8
#![ crate_type = "lib" ]
9
- #![ feature( c_unwind) ]
10
9
11
10
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
12
11
#[ no_mangle]
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 2
2
// ignore-wasm32-bare compiled with panic=abort by default
3
3
4
4
#![ crate_type = "lib" ]
5
- #![ feature( c_unwind) ]
6
5
7
6
// We disable optimizations to prevent LLVM from inferring the attribute.
8
7
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 6
6
// optimizations above to prevent LLVM from inferring the attribute.
7
7
8
8
#![ crate_type = "lib" ]
9
- #![ feature( c_unwind) ]
10
9
11
10
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
12
11
#[ no_mangle]
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind , abi_vectorcall) ]
4
+ #![ feature( no_core, lang_items, abi_vectorcall) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 1
1
// needs-llvm-components: x86
2
2
// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
3
3
#![ no_core]
4
- #![ feature( no_core, lang_items, c_unwind ) ]
4
+ #![ feature( no_core, lang_items) ]
5
5
#[ lang="sized" ]
6
6
trait Sized { }
7
7
Original file line number Diff line number Diff line change 1
1
// compile-flags: -C panic=abort
2
2
3
3
#![ crate_type = "lib" ]
4
- #![ feature( c_unwind) ]
5
4
6
5
extern "C-unwind" {
7
6
fn bar ( ) ;
Original file line number Diff line number Diff line change 3
3
// needs-unwind
4
4
5
5
#![ crate_type = "lib" ]
6
- #![ feature( c_unwind) ]
7
6
8
7
// Make sure these all do *not* get the attribute.
9
8
// We disable optimizations to prevent LLVM from inferring the attribute.
Original file line number Diff line number Diff line change 3
3
// needs-unwind
4
4
5
5
#![ crate_type = "lib" ]
6
- #![ feature( c_unwind) ]
7
6
8
7
extern "C" {
9
8
// CHECK: Function Attrs:{{.*}}nounwind
Original file line number Diff line number Diff line change 1
- #![ feature( c_unwind) ]
2
1
#![ allow( unused_assignments) ]
3
2
4
3
extern "C" fn might_abort ( should_abort : bool ) {
Original file line number Diff line number Diff line change 1
1
// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
2
2
3
- #![ feature( c_unwind) ]
4
3
#![ no_main]
5
4
6
5
extern "C-unwind" {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ impl Drop for Foo<'_> {
16
16
}
17
17
}
18
18
19
- extern "C" fn panicky ( ) {
19
+ extern "C-unwind " fn panicky ( ) {
20
20
resume_unwind ( Box :: new ( ( ) ) ) ;
21
21
}
22
22
Original file line number Diff line number Diff line change 1
- #![ feature( c_unwind , const_extern_fn) ]
1
+ #![ feature( const_extern_fn) ]
2
2
3
3
const extern "C" fn foo ( ) {
4
4
panic ! ( ) //~ ERROR evaluation of constant value failed
Original file line number Diff line number Diff line change 1
1
// check-pass
2
2
3
- #![ feature( c_unwind , const_extern_fn) ]
3
+ #![ feature( const_extern_fn) ]
4
4
5
5
// We don't unwind in const-eval anyways.
6
6
const extern "C" fn foo ( ) {
Original file line number Diff line number Diff line change 3
3
//[next] compile-flags: -Ztrait-solver=next
4
4
5
5
#![ allow( unused_must_use) ]
6
- #![ feature( c_unwind) ]
7
6
#![ feature( panic_always_abort) ]
8
7
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
9
8
// we never unwind through them.
Original file line number Diff line number Diff line change 7
7
// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
8
8
// needs-unwind
9
9
// ignore-emscripten "RuntimeError" junk in output
10
- #![ feature( c_unwind) ]
11
10
12
11
extern "C" fn panic_in_ffi ( ) {
13
12
panic ! ( "Test" ) ;
Original file line number Diff line number Diff line change 1
- thread 'main' panicked at $DIR/panic-in-ffi.rs:13 :5:
1
+ thread 'main' panicked at $DIR/panic-in-ffi.rs:12 :5:
2
2
Test
3
3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4
4
thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
Load Diff This file was deleted.
0 commit comments