Package: libwlroots-0.18
Version: 0.18.2-3+patch1
Severity: important
Tags: patch upstream
X-Debbugs-Cc: [email protected]
Dear Maintainer,
Sway crashes reproducibly with fractional scaling (e.g. scale 1.25 or
1.75) due to an assertion failure in wlr_render_pass_add_texture:
sway: render/pass.c:23: wlr_render_pass_add_texture: Assertion
`box->x >= 0 && box->y >= 0 &&
box->x + box->width <= options->texture->width &&
box->y + box->height <= options->texture->height' failed.
The crash is triggered under moderate load with fractional scaling
active. Setting scale to 1.0 prevents it. This is the same root cause
as closed bug #1115160, which was fixed in wlroots 0.19.1-1 (unstable)
by casting floating-point sums to uint32_t before comparing against
integer texture dimensions.
The fix backports cleanly to 0.18.2. Patch:
--- a/render/pass.c
+++ b/render/pass.c
@@ -21,8 +21,8 @@
if (!wlr_fbox_empty(&options->src_box)) {
const struct wlr_fbox *box = &options->src_box;
assert(box->x >= 0 && box->y >= 0 &&
- box->x + box->width <= options->texture->width &&
- box->y + box->height <= options->texture->height);
+ (uint32_t)(box->x + box->width) <=
options->texture->width &&
+ (uint32_t)(box->y + box->height) <=
options->texture->height);
}
I built and installed libwlroots-0.18_0.18.2-3+patch1 locally and the
crash has not recurred. Please consider including this fix in a trixie
point update.
System: ThinkPad X1 Carbon 7th gen, Sway 1.10.1-2, eDP-1 at scale 1.25.
-- System Information:
Debian Release: 13.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libwlroots-0.18 depends on:
ii libc6 2.41-12+deb13u2
ii libdisplay-info2 0.2.0-2
ii libdrm2 2.4.124-2
ii libegl1 1.7.0-1+b2
ii libgbm1 25.0.7-2
ii libgles2 1.7.0-1+b2
ii libinput10 1.28.1-1
ii liblcms2-2 2.16-2
ii libliftoff0 0.5.0-1.1
ii libpixman-1-0 0.44.0-3
ii libseat1 0.9.1-1
ii libudev1 257.9-1~deb13u1
ii libvulkan1 1.4.309.0-1
ii libwayland-client0 1.23.1-3
ii libwayland-server0 1.23.1-3
ii libxcb-composite0 1.17.0-2+b1
ii libxcb-dri3-0 1.17.0-2+b1
ii libxcb-errors0 1.0.1-4
ii libxcb-ewmh2 0.4.2-1
ii libxcb-icccm4 0.4.2-1
ii libxcb-present0 1.17.0-2+b1
ii libxcb-render-util0 0.3.10-1
ii libxcb-render0 1.17.0-2+b1
ii libxcb-res0 1.17.0-2+b1
ii libxcb-shm0 1.17.0-2+b1
ii libxcb-xfixes0 1.17.0-2+b1
ii libxcb-xinput0 1.17.0-2+b1
ii libxcb1 1.17.0-2+b1
ii libxkbcommon0 1.7.0-2
libwlroots-0.18 recommends no packages.
libwlroots-0.18 suggests no packages.
-- no debconf information