x11vnc: fix double X_UNLOCK on xrandr events#13
Merged
dscho merged 1 commit intoLibVNC:masterfrom Jul 18, 2014
Merged
Conversation
check_xrandr_event() assumes X_LOCK is taken before it is called, and currently calls X_UNLOCK on behalf of the caller. But in practice, all callers assume that the lock is still held after check_xrandr_event() returns. In particular, this leads to a double-unlock and crash in check_xevents() on any xrandr event.
|
hi guys. what is your debugging tools for LibVNC? there are only make files. i can visual studio or Xcode. i'm not farmiliar with make or console debugging. let you know your tips for me? |
dscho
added a commit
that referenced
this pull request
Jul 18, 2014
x11vnc: fix double X_UNLOCK on xrandr events
Contributor
|
@wjt sorry to let this slide for a week, my only explanation is that I am very close to moving and have to tie up a lot of loose ends at work... Thanks for your contribution! |
Contributor
@breaklee a much better idea than hijacking an unrelated issue, and than submitting a request for assistance on an issue tracker, is to write a mail to the mailing list. |
Contributor
Author
|
@dscho no problem at all, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
check_xrandr_event() assumes X_LOCK is taken before it is called, and currently calls X_UNLOCK on behalf of the caller. But in practice, all callers assume that the lock is still held after check_xrandr_event() returns. In particular, this leads to a double-unlock and crash in check_xevents() on any xrandr resize event.
Steps to Reproduce:
x11vnc -rfbport 5901 -display :0 -localhost. It doesn't make any difference whether you pass an '-xrandr' option or not. There is also no need to connect a client.For a stacktrace, see this Fedora bug report.
I've not tested this fix extensively, but it does seem to work. I don't run x11vnc with
-threadsso I guess there's a whole class of potential bugs I might be avoiding. :)