From 08354cf5735d3b8a3087b803899858ab9bc18be6 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 13 Jul 2026 16:56:36 -0400 Subject: [PATCH] Explicitly encode assumption that an overlapping section exists --- src/link/assign.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/link/assign.cpp b/src/link/assign.cpp index 4b678ca8..f1e61969 100644 --- a/src/link/assign.cpp +++ b/src/link/assign.cpp @@ -305,10 +305,12 @@ static void placeSection(Section §ion) { ); } else { // Otherwise there is overlap with another section + Section const *overlap = out_OverlappingSection(section); + assume(overlap != nullptr); fatal( "Unable to place %s: section overlaps with \"%s\"", getSectionDescription(section).c_str(), - out_OverlappingSection(section)->name.c_str() + overlap->name.c_str() ); } }