diff options
author | Steven Newbury <steve@snewbury.org.uk> | 2022-02-08 12:02:51 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-05-24 20:39:32 +0000 |
commit | ad06c12c89791dad0c3858a75102277127158063 (patch) | |
tree | bf33ad28575137f18638ecf3eaf5ff8549c28432 /backend | |
parent | 078d8dd472259f341f5efc7ac8f38347b3732cc0 (diff) |
util: Fix infinite loop in recursive function
When testing Xwayland multi-HiDPI support with Wine + SimCity4
I encountered a 100% CPU lockup from sway. This turned out to be
triggering a bug in the wlroots pointer contraint code.
region_confine() contains multiple recursive calls where arguments
are modified and resubmitted to the function. One of the calls
is however made using the original arguments, if/when this triggers
it results in the same codepath being followed each loop so the
condition always applies.
It makes much more sense if this was intended to apply the clamped
values x,y instead of the original x1,y1, and indeed this fixes the
infinite loop and results in correct behaviour.
Diffstat (limited to 'backend')
0 files changed, 0 insertions, 0 deletions