Skip to content
Snippets Groups Projects

Fix deadlock in XRebindKeysym()

Merged Olivier Fourdan requested to merge ofourdan/libx11:fix-issue-216 into master
All threads resolved!

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)

Edited by Olivier Fourdan

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading