about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/errors.rs
diff options
context:
space:
mode:
authorGeorge Tokmaji <tokmajigeorge@gmail.com>2025-05-31 21:18:41 +0200
committerGeorge Tokmaji <tokmajigeorge@gmail.com>2025-08-08 00:16:53 +0200
commitb60f75c9261e0968fbb6f3aa435660db189e0ab5 (patch)
tree6a1f76895f9816fd1e0886717d2ed78a967eaa19 /compiler/rustc_codegen_ssa/src/errors.rs
parent2fd855fbfc8239285aa2d596f76a8cc75e17ce02 (diff)
downloadrust-b60f75c9261e0968fbb6f3aa435660db189e0ab5.tar.gz
rust-b60f75c9261e0968fbb6f3aa435660db189e0ab5.zip
Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being
used for stack buffer overruns if link.exe exits with that exit code

`STATUS_STACK_BUFFER_OVERRUN` is also used for fast abnormal program
termination, e.g. by abort(). Emit a special diagnostic to let people
know that this most likely doesn't indicate a stack buffer overrun.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/errors.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs
index 3d787d8bdbd..9ef1473e538 100644
--- a/compiler/rustc_codegen_ssa/src/errors.rs
+++ b/compiler/rustc_codegen_ssa/src/errors.rs
@@ -551,6 +551,11 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for LinkingFailed<'_> {
 pub(crate) struct LinkExeUnexpectedError;
 
 #[derive(Diagnostic)]
+#[diag(codegen_ssa_link_exe_status_stack_buffer_overrun)]
+#[note]
+pub(crate) struct LinkExeStatusStackBufferOverrun;
+
+#[derive(Diagnostic)]
 #[diag(codegen_ssa_repair_vs_build_tools)]
 pub(crate) struct RepairVSBuildTools;