Fix deadlock in XRebindKeysym()
Xlib is now built with threading support enabled from the constructor by default.
XRebindKeysym()
acquires the display lock, then calls:
| XRebindKeysym()
| LockDisplay()
| ComputeMaskFromKeytrans()
| -> XkbKeysymToModifiers()
| -> _XkbLoadDpy()
| -> XkbGetMap()
| -> XkbGetUpdatedMap()
| LockDisplay()
And the dead lock:
| Xlib ERROR: XKBGetMap.c line 575 thread 1fc6e580: locking display already
| locked at KeyBind.c line 937
To avoid the issue, call ComputeMaskFromKeytrans() from outside the display lock.
Signed-off-by: Olivier Fourdan ofourdan@redhat.com
Closes: #216 (closed)
Merge request reports
Activity
- Resolved by Alan Coopersmith
The code change seems reasonable - in the commit message, did you mean "Avoid" where you wrote "void the issue..."?
added 2 commits
assigned to @marge-bot
mentioned in commit ofourdan/libx11@751fbc59
mentioned in merge request !263 (merged)