[llvm] [llvm-dwp] Fix FoundCUUnit problem on soft-stop with DWARF5 (PR #169783)
Jinjie Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 02:00:26 PST 2025
https://github.com/Jinjie-Huang created https://github.com/llvm/llvm-project/pull/169783
Currently, when a 'soft-stop' is triggered due to debug_info overflow, there is an additional check for DWARF5 to verify if the dwo contains a split_compile unit (CU). However, since split_type units (TUs) are typically placed before CUs in debug_info, if an overflow is detected within a TU causing an early break, the logic incorrectly assumes the DWO lacks a CU and triggers an error.
Since the overflowing DWO will be discarded anyway, this validation is redundant. This patch tries to remove the CU check during a soft-stop.
>From ce64dcca5fb130bf52b8fb58cf7127a8bf628318 Mon Sep 17 00:00:00 2001
From: huangjinjie <huangjinjie at bytedance.com>
Date: Thu, 27 Nov 2025 15:48:10 +0800
Subject: [PATCH] fix FoundCUUnit problem on soft_stop
---
llvm/lib/DWP/DWP.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/lib/DWP/DWP.cpp b/llvm/lib/DWP/DWP.cpp
index d823292747393..ea029e97464bc 100644
--- a/llvm/lib/DWP/DWP.cpp
+++ b/llvm/lib/DWP/DWP.cpp
@@ -826,9 +826,7 @@ Error write(MCStreamer &Out, ArrayRef<std::string> Inputs,
"debug_info", OverflowOptValue, AnySectionOverflow))
return Err;
if (AnySectionOverflow) {
- if (Header.Version < 5 ||
- Header.UnitType == dwarf::DW_UT_split_compile)
- FoundCUUnit = true;
+ FoundCUUnit = true;
break;
}
}
More information about the llvm-commits
mailing list