[llvm] [DWARFLinker] Erase the type ref patch list with the section data (PR #217989)
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 10:36:22 PDT 2026
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/217989
SectionDescriptor::clearAllSectionData drops every patch list but ListDebugDieTypeRefPatch. maybeResetToLoadedStage calls eraseSections() on a unit which is already past Stage::Cloned, so that list outlives the section content it points into and is then applied to the offsets of the re-cloned content.
>From 1084a22a5152230cfd022537a643a308f1845ffc Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 20 Aug 2026 09:53:46 -0700
Subject: [PATCH] [DWARFLinker] Erase the type ref patch list with the section
data
SectionDescriptor::clearAllSectionData drops every patch list but
ListDebugDieTypeRefPatch. maybeResetToLoadedStage calls eraseSections()
on a unit which is already past Stage::Cloned, so that list outlives
the section content it points into and is then applied to the offsets
of the re-cloned content.
Assisted-by: Claude
---
llvm/lib/DWARFLinker/Parallel/OutputSections.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp b/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
index 079be51ace24a..7d9a47a48b663 100644
--- a/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
+++ b/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
@@ -66,6 +66,7 @@ void SectionDescriptor::clearAllSectionData() {
ListDebugDieRefPatch.erase();
ListDebugULEB128DieRefPatch.erase();
ListDebugOffsetPatch.erase();
+ ListDebugDieTypeRefPatch.erase();
ListDebugType2TypeDieRefPatch.erase();
ListDebugTypeDeclFilePatch.erase();
ListDebugTypeLineStrPatch.erase();
More information about the llvm-commits
mailing list