Skip to content

Commit

Permalink
Diagnose misaligned pointer deref panics
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Aug 27, 2023
1 parent 14754c0 commit 1c87f0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/diagnose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1c87f0a

Please sign in to comment.