From 1c87f0a9dd360a762f6c7a07364ac79ae797eef3 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sun, 27 Aug 2023 07:55:21 -0400 Subject: [PATCH] Diagnose misaligned pointer deref panics --- src/diagnose.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/diagnose.rs b/src/diagnose.rs index 747a4d5..8397d44 100644 --- a/src/diagnose.rs +++ b/src/diagnose.rs @@ -32,6 +32,13 @@ pub fn diagnose(krate: &mut Crate, output: &[u8]) -> Result<()> { source_crate: None, }], } + } else if output.contains("misaligned pointer dereference") { + Status::UB { + cause: vec![Cause { + kind: "misaligned pointer dereference".to_string(), + source_crate: None, + }], + } } else if output.contains("attempted to leave type") { Status::UB { cause: vec![Cause {