Consistent segfault in Xephyr
Sergei Zhirikov
sfzhi at yahoo.com
Sun Aug 17 03:12:57 PDT 2014
Hi,
I have recently installed xorg-server (version 1.15.2, built from source). Most of it works fine, but whenever I try to start Xephyr it immediately crashes with segmentation fault. A little bit of debugging shows the cause. It's the following piece of code in hw/kdrive/ephyr/ephyrvideo.c starting from line 521 (as far as I can see, that part is still the same in the master branch):
for (j = 0; j < cur_host_adaptor->num_formats; j++) {
xcb_visualtype_t *visual =
xcb_aux_find_visual_by_id(xscreen, format[j].visual);
a_this->adaptors[i].pFormats[j].depth = format[j].depth;
a_this->adaptors[i].pFormats[j].class = visual->_class; // <== segfault here
}
It turns out the "visual" returned by xcb_aux_find_visual_by_id() is NULL for the requested visual ID of 112. According to xdpyinfo, no such visual exists. Although, one with ID 112 does exist on another screen (I have a single video adapter with two outputs configured in ZaphodHeads mode).
I have to admit that I am quite unfamiliar with the internals of Xephyr, Xorg or X11 in general, so my conclusion may be completely wrong. From my limited understanding it looks to me like Xephyr is doing something wrong there.
Trying to avoid the segfault I added simple "if (visual != NULL)" and that appears to have solved the problem. But I suspect that may not be the right solution in principle.
Is that indeed a bug in Xephyr? Should I expect any negative side-effects of my simplistic workaround?
Thanks & regards,
Sergei.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140817/82880acd/attachment-0001.html>
More information about the xorg-devel
mailing list