Summary: | Xephyr segfaults with 8 or 16-bit color depth | ||
---|---|---|---|
Product: | xorg | Reporter: | Michele Baldessari <michele> |
Component: | Server/DDX/Xephyr | Assignee: | Xorg Project Team <xorg-team> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | consume.noise |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Michele Baldessari
2013-09-14 14:36:39 UTC
Issue introduced via: commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349 Author: Daniel Martin <consume.noise@gmail.com> Date: Thu Dec 20 13:50:17 2012 +0100 ephyr: Fix crash on 24bpp host framebuffer Use bytes_per_line and bits_per_pixel from the created XImage to fix https://bugzilla.redhat.com/show_bug.cgi?id=518960 Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> For the record both 8 and 18bit depth crash. So: Xephyr -screen 800x600x8 :1 Xephyr -screen 800x600x16 :1 Whereas 24 and 32 depths keep working The following patch fixes it for me and keeps the other cases (24bpp/32bpp) working: diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 5071289..90db002 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -697,9 +697,10 @@ hostx_screen_init(EphyrScreenInfo screen, malloc(host_screen->ximg->bytes_per_line * buffer_height); } - *bytes_per_line = host_screen->ximg->bytes_per_line; - *bits_per_pixel = host_screen->ximg->bits_per_pixel; - + if (host_depth_matches_server(host_screen)) { + *bytes_per_line = host_screen->ximg->bytes_per_line; + *bits_per_pixel = host_screen->ximg->bits_per_pixel; + } XResizeWindow(HostX.dpy, host_screen->win, width, height); /* Ask the WM to keep our size static */ Patch sent to xorg-devel: http://lists.x.org/archives/xorg-devel/2013-September/037796.html This appears to leave those variables uninitialized when host_depth_matches_server() returns FALSE. Also if you use the -resizeable option and resize the window after applying this patch, the display ends up garbled. Fixed via patches from Soren: 623c414 ephyr: Ensure stride of private framebuffer is multiple of 4 97cf53c ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line Closing |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.