From 17bde264620a900d876206d3537d5979791bf978 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Mon, 26 Aug 2024 17:14:46 +0200 Subject: [PATCH] Fix crash when compiled with Clang with LTO enabled Bug: https://bugs.webkit.org/show_bug.cgi?id=274780 Origin: https://github.com/WebKit/WebKit/commit/4854b944b345990e4100319662777856fe8ea4aa =================================================================== Gbp-Pq: Name fix-clang-build.patch --- Source/WebCore/rendering/TextDecorationPainter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/rendering/TextDecorationPainter.cpp b/Source/WebCore/rendering/TextDecorationPainter.cpp index 229857f64..a58bbd86f 100644 --- a/Source/WebCore/rendering/TextDecorationPainter.cpp +++ b/Source/WebCore/rendering/TextDecorationPainter.cpp @@ -140,8 +140,10 @@ static DashArray translateIntersectionPointsToSkipInkBoundaries(const DashArray& else intermediateTuples.append(*i); } - } else - intermediateTuples = tuples; + } else { + // XXX(274780): A plain assignment or move here makes Clang generate bad code in LTO builds. + intermediateTuples.swap(tuples); + } // Step 3: Output the space between the ranges, but only if the space warrants an underline. float previous = 0; -- 2.30.2