about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-04 18:58:20 +0000
committerbors <bors@rust-lang.org>2024-05-04 18:58:20 +0000
commit82a8059755950dfd9c3166bdcd1af335ff147b6a (patch)
tree960f8dc9fd1b5888d7b46ee77e984722ac502f00 /src
parentd0e77727b1191348db94e75bb5c9c54cd14643e0 (diff)
parentcdf3f3c2024f8634b93ad80ea6f9915c12276d51 (diff)
downloadrust-82a8059755950dfd9c3166bdcd1af335ff147b6a.tar.gz
rust-82a8059755950dfd9c3166bdcd1af335ff147b6a.zip
Auto merge of #3562 - RalfJung:unsupported, r=RalfJung
only show the 'basic API common for this target' message when this is a missing foreign function

Follow-up to https://github.com/rust-lang/miri/pull/3558
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/diagnostics.rs13
-rw-r--r--src/tools/miri/src/helpers.rs10
-rw-r--r--src/tools/miri/src/shims/foreign_items.rs4
-rw-r--r--src/tools/miri/src/shims/unix/linux/foreign_items.rs4
-rw-r--r--src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr4
-rw-r--r--src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr1
-rw-r--r--src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr1
-rw-r--r--src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr1
-rw-r--r--src/tools/miri/tests/fail-dep/tokio/sleep.stderr1
-rw-r--r--src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr4
-rw-r--r--src/tools/miri/tests/fail/alloc/no_global_allocator.stderr4
-rw-r--r--src/tools/miri/tests/fail/extern-type-field-offset.stderr1
-rw-r--r--src/tools/miri/tests/fail/extern_static.stderr1
-rw-r--r--src/tools/miri/tests/fail/extern_static_in_const.stderr1
-rw-r--r--src/tools/miri/tests/fail/extern_static_wrong_size.stderr1
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.stderr2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.stderr2
-rw-r--r--src/tools/miri/tests/fail/intrinsic_fallback_checks_ub.stderr1
-rw-r--r--src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr1
-rw-r--r--src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-flags.stderr1
-rw-r--r--src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr1
-rw-r--r--src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr1
-rw-r--r--src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr1
-rw-r--r--src/tools/miri/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr1
-rw-r--r--src/tools/miri/tests/fail/unaligned_pointers/promise_alignment_zero.stderr1
-rw-r--r--src/tools/miri/tests/fail/unsized-local.stderr1
-rw-r--r--src/tools/miri/tests/fail/unsupported_foreign_function.stderr4
32 files changed, 34 insertions, 44 deletions
diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs
index 5fac922f568..cb5ed27b6cf 100644
--- a/src/tools/miri/src/diagnostics.rs
+++ b/src/tools/miri/src/diagnostics.rs
@@ -48,6 +48,7 @@ pub enum TerminationInfo {
         extra: Option<&'static str>,
         retag_explain: bool,
     },
+    UnsupportedForeignItem(String),
 }
 
 pub struct RacingOp {
@@ -85,6 +86,7 @@ impl fmt::Display for TerminationInfo {
                     op2.action,
                     op2.thread_info
                 ),
+            UnsupportedForeignItem(msg) => write!(f, "{msg}"),
         }
     }
 }
@@ -214,7 +216,7 @@ pub fn report_error<'tcx, 'mir>(
         let title = match info {
             Exit { code, leak_check } => return Some((*code, *leak_check)),
             Abort(_) => Some("abnormal termination"),
-            UnsupportedInIsolation(_) | Int2PtrWithStrictProvenance =>
+            UnsupportedInIsolation(_) | Int2PtrWithStrictProvenance | UnsupportedForeignItem(_) =>
                 Some("unsupported operation"),
             StackedBorrowsUb { .. } | TreeBorrowsUb { .. } | DataRace { .. } =>
                 Some("Undefined Behavior"),
@@ -228,6 +230,12 @@ pub fn report_error<'tcx, 'mir>(
                     (None, format!("pass the flag `-Zmiri-disable-isolation` to disable isolation;")),
                     (None, format!("or pass `-Zmiri-isolation-error=warn` to configure Miri to return an error code from isolated operations (if supported for that operation) and continue with a warning")),
                 ],
+            UnsupportedForeignItem(_) => {
+                vec![
+                    (None, format!("if this is a basic API commonly used on this target, please report an issue with Miri")),
+                    (None, format!("however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases")),
+                ]
+            }
             StackedBorrowsUb { help, history, .. } => {
                 msg.extend(help.clone());
                 let mut helps = vec![
@@ -322,7 +330,6 @@ pub fn report_error<'tcx, 'mir>(
             Unsupported(_) =>
                 vec![
                     (None, format!("this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support")),
-                    (None, format!("if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there")),
                 ],
             UndefinedBehavior(AlignmentCheckFailed { .. })
                 if ecx.machine.check_alignment == AlignmentCheck::Symbolic
@@ -347,7 +354,7 @@ pub fn report_error<'tcx, 'mir>(
                     }
                     AbiMismatchArgument { .. } | AbiMismatchReturn { .. } => {
                         helps.push((None, format!("this means these two types are not *guaranteed* to be ABI-compatible across all targets")));
-                        helps.push((None, format!("if you think this code should be accepted anyway, please report an issue")));
+                        helps.push((None, format!("if you think this code should be accepted anyway, please report an issue with Miri")));
                     }
                     _ => {},
                 }
diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs
index 92bdaf30170..f81e997efd8 100644
--- a/src/tools/miri/src/helpers.rs
+++ b/src/tools/miri/src/helpers.rs
@@ -1067,20 +1067,18 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
         crate_name == "std" || crate_name == "std_miri_test"
     }
 
-    /// Handler that should be called when unsupported functionality is encountered.
+    /// Handler that should be called when an unsupported foreign item is encountered.
     /// This function will either panic within the context of the emulated application
     /// or return an error in the Miri process context
-    ///
-    /// Return value of `Ok(bool)` indicates whether execution should continue.
-    fn handle_unsupported<S: AsRef<str>>(&mut self, error_msg: S) -> InterpResult<'tcx, ()> {
+    fn handle_unsupported_foreign_item(&mut self, error_msg: String) -> InterpResult<'tcx, ()> {
         let this = self.eval_context_mut();
         if this.machine.panic_on_unsupported {
             // message is slightly different here to make automated analysis easier
-            let error_msg = format!("unsupported Miri functionality: {}", error_msg.as_ref());
+            let error_msg = format!("unsupported Miri functionality: {error_msg}");
             this.start_panic(error_msg.as_ref(), mir::UnwindAction::Continue)?;
             Ok(())
         } else {
-            throw_unsup_format!("{}", error_msg.as_ref());
+            throw_machine_stop!(TerminationInfo::UnsupportedForeignItem(error_msg));
         }
     }
 
diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs
index 4f8bb801100..7c97d597ae4 100644
--- a/src/tools/miri/src/shims/foreign_items.rs
+++ b/src/tools/miri/src/shims/foreign_items.rs
@@ -119,7 +119,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                         if let Some(body) = this.lookup_exported_symbol(link_name)? {
                             return Ok(Some(body));
                         }
-                        this.handle_unsupported(format!(
+                        this.handle_unsupported_foreign_item(format!(
                             "can't call (diverging) foreign function: {link_name}"
                         ))?;
                         return Ok(None);
@@ -140,7 +140,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                     return Ok(Some(body));
                 }
 
-                this.handle_unsupported(format!(
+                this.handle_unsupported_foreign_item(format!(
                     "can't call foreign function `{link_name}` on OS `{os}`",
                     os = this.tcx.sess.target.os,
                 ))?;
diff --git a/src/tools/miri/src/shims/unix/linux/foreign_items.rs b/src/tools/miri/src/shims/unix/linux/foreign_items.rs
index a72ca510b4b..9d1deb3201c 100644
--- a/src/tools/miri/src/shims/unix/linux/foreign_items.rs
+++ b/src/tools/miri/src/shims/unix/linux/foreign_items.rs
@@ -144,7 +144,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                         futex(this, &args[1..], dest)?;
                     }
                     id => {
-                        this.handle_unsupported(format!("can't execute syscall with ID {id}"))?;
+                        this.handle_unsupported_foreign_item(format!(
+                            "can't execute syscall with ID {id}"
+                        ))?;
                         return Ok(EmulateForeignItemResult::AlreadyJumped);
                     }
                 }
diff --git a/src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr b/src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr
index 26761c48721..e905d7d0391 100644
--- a/src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr
+++ b/src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr
@@ -4,8 +4,8 @@ error: unsupported operation: can't call foreign function `foo` on $OS
 LL |         foo();
    |         ^^^^^ can't call foreign function `foo` on $OS
    |
-   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
+   = help: if this is a basic API commonly used on this target, please report an issue with Miri
+   = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
    = note: BACKTRACE:
    = note: inside `main` at $DIR/function_not_in_so.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr b/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr
index e5048015765..e1b1b053bbc 100644
--- a/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr
+++ b/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr
@@ -5,7 +5,6 @@ LL |         libc::close(1);
    |         ^^^^^^^^^^^^^^ cannot close stdout
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/close_stdout.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr b/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr
index fb0fb8acc3f..baa6eb5ad6a 100644
--- a/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr
+++ b/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr
@@ -5,7 +5,6 @@ LL |         libc::read(1, bytes.as_mut_ptr() as *mut libc::c_void, 512);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot read from stdout
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/read_from_stdout.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr b/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr
index 8426c5cb847..37323faf560 100644
--- a/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr
+++ b/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr
@@ -5,7 +5,6 @@ LL |         libc::write(0, bytes.as_ptr() as *const libc::c_void, 5);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot write to stdin
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/write_to_stdin.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail-dep/tokio/sleep.stderr b/src/tools/miri/tests/fail-dep/tokio/sleep.stderr
index f7d829f77d2..4b12729bbff 100644
--- a/src/tools/miri/tests/fail-dep/tokio/sleep.stderr
+++ b/src/tools/miri/tests/fail-dep/tokio/sleep.stderr
@@ -10,7 +10,6 @@ LL | |         ))
    | |__________^ returning ready events from epoll_wait is not yet implemented
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
 
 error: aborting due to 1 previous error
 
diff --git a/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr b/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr
index 23327ff7dbd..f62622e29bf 100644
--- a/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr
+++ b/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr
@@ -4,8 +4,8 @@ error: unsupported operation: can't call foreign function `signal` on $OS
 LL |         libc::signal(libc::SIGPIPE, libc::SIG_IGN);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `signal` on $OS
    |
-   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
+   = help: if this is a basic API commonly used on this target, please report an issue with Miri
+   = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
    = note: BACKTRACE:
    = note: inside `main` at $DIR/unsupported_incomplete_function.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/alloc/no_global_allocator.stderr b/src/tools/miri/tests/fail/alloc/no_global_allocator.stderr
index 70f60a3f591..82bcb48cbe6 100644
--- a/src/tools/miri/tests/fail/alloc/no_global_allocator.stderr
+++ b/src/tools/miri/tests/fail/alloc/no_global_allocator.stderr
@@ -4,8 +4,8 @@ error: unsupported operation: can't call foreign function `__rust_alloc` on $OS
 LL |         __rust_alloc(1, 1);
    |         ^^^^^^^^^^^^^^^^^^ can't call foreign function `__rust_alloc` on $OS
    |
-   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
+   = help: if this is a basic API commonly used on this target, please report an issue with Miri
+   = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
    = note: BACKTRACE:
    = note: inside `start` at $DIR/no_global_allocator.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/extern-type-field-offset.stderr b/src/tools/miri/tests/fail/extern-type-field-offset.stderr
index 14609ec699c..e0d6e9ebf1d 100644
--- a/src/tools/miri/tests/fail/extern-type-field-offset.stderr
+++ b/src/tools/miri/tests/fail/extern-type-field-offset.stderr
@@ -5,7 +5,6 @@ LL |     let _field = &x.a;
    |                  ^^^^ `extern type` does not have a known offset
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/extern-type-field-offset.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/extern_static.stderr b/src/tools/miri/tests/fail/extern_static.stderr
index 1d12fd76bed..21759f96019 100644
--- a/src/tools/miri/tests/fail/extern_static.stderr
+++ b/src/tools/miri/tests/fail/extern_static.stderr
@@ -5,7 +5,6 @@ LL |     let _val = unsafe { std::ptr::addr_of!(FOO) };
    |                                            ^^^ extern static `FOO` is not supported by Miri
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/extern_static.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/extern_static_in_const.stderr b/src/tools/miri/tests/fail/extern_static_in_const.stderr
index 455d6af18e4..aa524c06469 100644
--- a/src/tools/miri/tests/fail/extern_static_in_const.stderr
+++ b/src/tools/miri/tests/fail/extern_static_in_const.stderr
@@ -5,7 +5,6 @@ LL |     let _val = X;
    |                ^ extern static `E` is not supported by Miri
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/extern_static_in_const.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/extern_static_wrong_size.stderr b/src/tools/miri/tests/fail/extern_static_wrong_size.stderr
index 91afb936fac..3c013a5d15d 100644
--- a/src/tools/miri/tests/fail/extern_static_wrong_size.stderr
+++ b/src/tools/miri/tests/fail/extern_static_wrong_size.stderr
@@ -5,7 +5,6 @@ LL |     let _val = unsafe { environ };
    |                         ^^^^^^^ extern static `environ` has been declared as `extern_static_wrong_size::environ` with a size of 1 bytes and alignment of 1 bytes, but Miri emulates it via an extern static shim with a size of N bytes and alignment of N bytes
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/extern_static_wrong_size.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr
index 595235088f6..2b2a898ce73 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr
@@ -7,7 +7,7 @@ LL |     g(Default::default())
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_array_vs_struct.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr
index a8b1cf40c04..752e17116d1 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr
@@ -7,7 +7,7 @@ LL |     g(42)
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_int_vs_float.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr
index 60dd3814bf5..907a8e50c41 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr
@@ -7,7 +7,7 @@ LL |     g(&42 as *const i32)
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_raw_pointer.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.stderr
index 6d42bea9da9..eaacc32bf68 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.stderr
@@ -7,7 +7,7 @@ LL |     fnptr(S1(NonZeroI32::new(1).unwrap()));
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_repr_C.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
index 198896b0dd7..3793590f842 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
@@ -7,7 +7,7 @@ LL |     g()
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_return_type.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.stderr
index daf216a142c..0c533c14173 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.stderr
@@ -7,7 +7,7 @@ LL |     g(42)
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_simple.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.stderr
index 50f4474cc0e..ef4b60b83b1 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.stderr
@@ -7,7 +7,7 @@ LL |     g(Default::default())
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
-   = help: if you think this code should be accepted anyway, please report an issue
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at $DIR/abi_mismatch_vector.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/intrinsic_fallback_checks_ub.stderr b/src/tools/miri/tests/fail/intrinsic_fallback_checks_ub.stderr
index 5dd6520fe42..699dda52096 100644
--- a/src/tools/miri/tests/fail/intrinsic_fallback_checks_ub.stderr
+++ b/src/tools/miri/tests/fail/intrinsic_fallback_checks_ub.stderr
@@ -5,7 +5,6 @@ LL |     ptr_guaranteed_cmp::<()>(std::ptr::null(), std::ptr::null());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ miri can only use intrinsic fallback bodies that check UB. After verifying that `ptr_guaranteed_cmp` does so, add the `#[miri::intrinsic_fallback_checks_ub]` attribute to it; also ping @rust-lang/miri when you do that
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/intrinsic_fallback_checks_ub.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr b/src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr
index 0d10b03fc4f..4064d7fe4e9 100644
--- a/src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr
+++ b/src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr
@@ -5,7 +5,6 @@ LL |     let _val = *DISPATCH_QUEUE_CONCURRENT;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ extern static `_dispatch_queue_attr_concurrent` is not supported by Miri
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-flags.stderr b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-flags.stderr
index ced44ee7768..504485e3b3a 100644
--- a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-flags.stderr
+++ b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-flags.stderr
@@ -5,7 +5,6 @@ LL |         miri_get_backtrace(2, std::ptr::null_mut());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_get_backtrace` flags 2
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/bad-backtrace-flags.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr
index 6e282ff4908..c1f0ce3d1a8 100644
--- a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr
+++ b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr
@@ -5,7 +5,6 @@ LL |         miri_resolve_frame(buf[0], 2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_resolve_frame` flags 2
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/bad-backtrace-resolve-flags.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr
index ddf8d221cc4..fc270593e63 100644
--- a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr
+++ b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr
@@ -5,7 +5,6 @@ LL | ...   miri_resolve_frame_names(buf[0], 2, std::ptr::null_mut(), std::ptr::n
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_resolve_frame_names` flags 2
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/bad-backtrace-resolve-names-flags.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr
index b3186fc5b07..2d70733334d 100644
--- a/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr
+++ b/src/tools/miri/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr
@@ -5,7 +5,6 @@ LL |         miri_backtrace_size(2);
    |         ^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_backtrace_size` flags 2
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/bad-backtrace-size-flags.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr b/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr
index 9ad715f7ba4..6d62db4d3d5 100644
--- a/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr
+++ b/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr
@@ -5,7 +5,6 @@ LL |         unsafe { utils::miri_promise_symbolic_alignment(align8.add(1).cast(
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `miri_promise_symbolic_alignment`: pointer is not actually aligned
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/promise_alignment.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment_zero.stderr b/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment_zero.stderr
index 62b6e852311..3f7ced0b407 100644
--- a/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment_zero.stderr
+++ b/src/tools/miri/tests/fail/unaligned_pointers/promise_alignment_zero.stderr
@@ -5,7 +5,6 @@ LL |     unsafe { utils::miri_promise_symbolic_alignment(buffer.as_ptr().cast(),
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `miri_promise_symbolic_alignment`: alignment must be a power of 2, got 0
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/promise_alignment_zero.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/unsized-local.stderr b/src/tools/miri/tests/fail/unsized-local.stderr
index d938f36bd5e..df54c98bb0e 100644
--- a/src/tools/miri/tests/fail/unsized-local.stderr
+++ b/src/tools/miri/tests/fail/unsized-local.stderr
@@ -5,7 +5,6 @@ LL |     let x = *(Box::new(A) as Box<dyn Foo>);
    |         ^ unsized locals are not supported
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
    = note: BACKTRACE:
    = note: inside `main` at $DIR/unsized-local.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/unsupported_foreign_function.stderr b/src/tools/miri/tests/fail/unsupported_foreign_function.stderr
index 7492fdd77bb..f392e9564c7 100644
--- a/src/tools/miri/tests/fail/unsupported_foreign_function.stderr
+++ b/src/tools/miri/tests/fail/unsupported_foreign_function.stderr
@@ -4,8 +4,8 @@ error: unsupported operation: can't call foreign function `foo` on $OS
 LL |         foo();
    |         ^^^^^ can't call foreign function `foo` on $OS
    |
-   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
-   = help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
+   = help: if this is a basic API commonly used on this target, please report an issue with Miri
+   = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
    = note: BACKTRACE:
    = note: inside `main` at $DIR/unsupported_foreign_function.rs:LL:CC