[PATCH xserver] randr: Fix a crash on initialization with GPU screens
Adam Jackson
ajax at redhat.com
Wed Feb 28 16:23:41 UTC 2018
RRSetChanged (immediately above) was immune to screens with no master,
but RRTellChanged was not:
Thread 1 "X" received signal SIGSEGV, Segmentation fault.
RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576
576 mastersp = rrGetScrPriv(master);
(gdb) bt
#0 RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576
#1 0x000055555566f1e9 in RRNoticePropertyChange (value=0x555555bfbf28, property=70, output=0x555555bfef10) at ../../randr/rrproperty.c:153
#2 RRChangeOutputProperty (output=output at entry=0x555555bfef10, property=<optimized out>, type=type at entry=19, format=format at entry=32, mode=<optimized out>, mode at entry=0, len=len at entry=1, value=0x7fffffffe77c, sendevent=1, pending=0)
at ../../randr/rrproperty.c:263
#3 0x000055555566dba5 in RROutputSetNonDesktop (output=output at entry=0x555555bfef10, nonDesktop=nonDesktop at entry=0) at ../../randr/rroutput.c:333
...
Reported-by: Michel Dänzer <michel at daenzer.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
randr/randr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/randr/randr.c b/randr/randr.c
index 339ad3ece..feb54bcc8 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -602,6 +602,8 @@ RRTellChanged(ScreenPtr pScreen)
if (pScreen->isGPU) {
master = pScreen->current_master;
+ if (!master)
+ return;
mastersp = rrGetScrPriv(master);
}
else {
--
2.16.2
More information about the xorg-devel
mailing list