From: Adrian Perez de Castro Date: Mon, 26 Aug 2024 15:14:46 +0000 (+0200) Subject: Fix crash when compiled with Clang with LTO enabled X-Git-Tag: archive/raspbian/2.48.1-2+rpi1~1^2^2^2^2^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=17bde264620a900d876206d3537d5979791bf978;p=wpewebkit.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 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;