[llvm] [SelectionDAG] Fix null pointer dereference in resolveDanglingDebugInfo (PR #173947)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 30 12:28:48 PST 2025


================
@@ -0,0 +1,42 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu | FileCheck %s
+
+; Regression test for a null pointer dereference in
+; SelectionDAG::resolveDanglingDebugInfo when Val.getNode() returns null
+; for aggregate types with nested empty structs.
+;
+; FIXME: This test appears to reveal deeper bugs in DWARF generation logic
+; under certain host/target combinations. For now, we restrict it to Linux
+; hosts only until those underlying issues are fixed.
----------------
arsenm wrote:

Given this test isn't crashing, this isn't showing anything? I thought the crashing was on macOS, so you would see this failure with an explicit Darwin triple? 

You could also probably add the failing line to x86 if it was macho related 

https://github.com/llvm/llvm-project/pull/173947


More information about the llvm-commits mailing list