From: Adrian Perez de Castro Date: Mon, 26 Aug 2024 13:24:02 +0000 (+0200) Subject: Fix crash when compiled with Clang with LTO enabled X-Git-Tag: archive/raspbian/2.44.3-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9ae86385c7d4a880ec523253fc8a10ffe33fb823;p=webkit2gtk.git 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 --- diff --git a/Source/WebCore/rendering/TextDecorationPainter.cpp b/Source/WebCore/rendering/TextDecorationPainter.cpp index 229857f64a..a58bbd86f4 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;