systemd/plasma-workspace: upgrade to 6.5.3

Related: 2a1715886b
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7446>
This commit is contained in:
Oliver Smith 2025-11-30 14:22:15 +01:00 committed by The Friendly Merge Bot
parent 4152e5d468
commit da01755a87
No known key found for this signature in database
2 changed files with 4 additions and 77 deletions

View file

@ -1,70 +0,0 @@
From 6bb87ff30e4bf00bb3086ee0657af0145810f2de Mon Sep 17 00:00:00 2001
From: John Zimmermann <me@johnnynator.dev>
Date: Sun, 9 Nov 2025 22:33:13 +0100
Subject: [PATCH] bitap: allocate patternMask on heap instead of stack
the current code results in a stackoverflow on systems
with smaller default stack size than glibc (e.g. musl)
BUG: 511233
---
runners/services/bitap.h | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/runners/services/bitap.h b/runners/services/bitap.h
index 1981878361d..be697a1316b 100644
--- a/runners/services/bitap.h
+++ b/runners/services/bitap.h
@@ -4,6 +4,7 @@
#pragma once
#include <bitset>
+#include <memory>
#include <optional>
#include <QDebug>
@@ -62,25 +63,26 @@ inline std::optional<Match> bitap(const QStringView &name, const QStringView &pa
// With hammingDistance >= pattern.length(), it would always match by changing the entire pattern, so clamp it.
hammingDistance = std::min(hammingDistance, int(pattern.length() - 1));
- const PatternMask patternMask = [&pattern, &name] {
- PatternMask patternMask;
+ // allocate on heap to prevent stackoverflow on musl libc (patternMask ~512k size, musl stack 128k)
+ std::unique_ptr<const PatternMask> patternMask = [&pattern, &name] {
+ auto patternMask = std::make_unique<PatternMask>();
// The following is an optimized version of patternMask.fill(Mask().set()); to set all **necessary** bits to 1.
for (const auto &qchar : pattern) {
- patternMask.at(qchar.unicode()).set();
+ patternMask->at(qchar.unicode()).set();
}
for (const auto &qchar : name) {
- patternMask.at(qchar.unicode()).set();
+ patternMask->at(qchar.unicode()).set();
}
for (int i = 0; i < pattern.size(); ++i) {
const auto char_ = pattern.at(i).unicode();
- patternMask.at(char_).reset(i); // unset the relevant index bits
+ patternMask->at(char_).reset(i); // unset the relevant index bits
}
if (BITAP().isDebugEnabled()) {
for (const auto &i : pattern) {
const auto char_ = i.unicode();
- qCDebug(BITAP) << "Pattern mask for" << char_ << "is" << patternMask.at(char_).to_string();
+ qCDebug(BITAP) << "Pattern mask for" << char_ << "is" << patternMask->at(char_).to_string();
}
}
@@ -97,7 +99,7 @@ inline std::optional<Match> bitap(const QStringView &name, const QStringView &pa
for (int i = 0; i < name.size(); ++i) {
const auto &char_ = name.at(i);
auto previousBit = bits[0];
- const auto mask = patternMask.at(char_.unicode());
+ const auto mask = patternMask->at(char_.unicode());
bits[0] |= mask;
bits[0] <<= 1;
--
GitLab

View file

@ -1,8 +1,8 @@
# Forked from Alpine to add systemd!
pkgname=plasma-workspace
pkgver=99996.5.2
_pkgver=6.5.2
pkgver=99996.5.3
_pkgver=6.5.3
pkgrel=1
pkgdesc="KDE Plasma Workspace"
# armhf blocked by qt6-qtdeclarative
@ -117,9 +117,7 @@ subpackages="
$pkgname-x11
"
_repo_url="https://invent.kde.org/plasma/plasma-workspace.git"
source="https://download.kde.org/$_rel/plasma/$_pkgver/plasma-workspace-$_pkgver.tar.xz
0001-plasma-workspace-bitap-allocate-patternMask-on-heap-instead-of-stack.patch
"
source="https://download.kde.org/$_rel/plasma/$_pkgver/plasma-workspace-$_pkgver.tar.xz"
builddir="$srcdir/$pkgname-$_pkgver"
replaces="xdg-desktop-portal-kde<=6.1.5-r0"
@ -210,6 +208,5 @@ x11() {
}
sha512sums="
53d23c0b9e98a23c7189b9a83bc9a21290e94d741a5e8f8f793b5a4742d8c46b2e1fdd9e0b143e153440a26219d0edc46e55acabe93cac07b988e323f2829ecc plasma-workspace-6.5.2.tar.xz
0bfa5b5331fbc9365726d80a289cbecc691a6ddb43cff6f32f18bec7d3d019af1fab08cf80f246ced092c4c12405d4f2083f438619712f3c85d868d2aa5117c9 0001-plasma-workspace-bitap-allocate-patternMask-on-heap-instead-of-stack.patch
7b504d23756b5ad8bfe5cab09a040aca2790312bd01397cf5cd9f2fffc563c9810cdbbb51467d57953f8b770b7988464ff7e1fd9b10f819050a9144bb72cebf1 plasma-workspace-6.5.3.tar.xz
"