|
1 | | - |
2 | | -thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC: |
3 | | -aborted execution: attempted to zero-initialize type `fn()`, which is invalid |
4 | | -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
5 | | -note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect |
6 | | -thread caused non-unwinding panic. aborting. |
7 | | -error: abnormal termination: the program aborted execution |
8 | | - --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC |
9 | | - | |
10 | | -LL | ABORT() |
11 | | - | ^ abnormal termination occurred here |
12 | | - | |
13 | | - = note: BACKTRACE: |
14 | | - = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC |
15 | | - = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC |
16 | | - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC |
17 | | - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC |
18 | | - = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC |
19 | | - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC |
20 | | -note: inside `main` |
| 1 | +error: Undefined Behavior: constructing invalid value: encountered a null function pointer |
21 | 2 | --> tests/fail/intrinsics/zero_fn_ptr.rs:LL:CC |
22 | 3 | | |
23 | 4 | LL | let _ = unsafe { std::mem::zeroed::<fn()>() }; |
24 | | - | ^ |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here |
| 6 | + | |
| 7 | + = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior |
| 8 | + = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information |
| 9 | + = note: BACKTRACE: |
| 10 | + = note: inside `main` at tests/fail/intrinsics/zero_fn_ptr.rs:LL:CC |
25 | 11 |
|
26 | 12 | note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace |
27 | 13 |
|
|
0 commit comments