Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-24 Thread Daniel Stone
Hi, On 24 January 2018 at 16:17, Adam Jackson wrote: > On Wed, 2018-01-24 at 11:36 +0100, Olivier Fourdan wrote: >> So basically, just remove the “if >> (RegionNotEmpty(DamageRegion(xwl_window->damage)))” would suffice? > > Worth a try anyway. I'm still just guessing at the root cause. If it is

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-24 Thread Olivier Fourdan
On Wed, Jan 24, 2018 at 5:17 PM, Adam Jackson wrote: > On Wed, 2018-01-24 at 11:36 +0100, Olivier Fourdan wrote: > > > So basically, just remove the “if > > (RegionNotEmpty(DamageRegion(xwl_window->damage)))” would suffice? > > Worth a try anyway. I'm still just guessing at the root cause. > Ri

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-24 Thread Adam Jackson
On Wed, 2018-01-24 at 11:36 +0100, Olivier Fourdan wrote: > So basically, just remove the “if > (RegionNotEmpty(DamageRegion(xwl_window->damage)))” would suffice? Worth a try anyway. I'm still just guessing at the root cause. - ajax ___ xorg-devel@lis

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-24 Thread Olivier Fourdan
Hi Adam, On Tue, Jan 23, 2018 at 6:41 PM, Adam Jackson wrote: > > Map / draw / unmap without hitting BlockHandler? I think > xwl_unrealize_window() might be broken for that case: > > /* ... */ > wl_surface_destroy(xwl_window->surface); > if (RegionNotEmpty(DamageRegion(xwl_window->da

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-23 Thread Adam Jackson
On Tue, 2018-01-23 at 10:15 +, Daniel Stone wrote: > Ooh. serialNumber == 1 means it's the root pixmap, which will actually > be uselessly empty. It would be interesting to see how we've ended up > here: it would have to be a top-level window which a) was manually > redirected by the WM when i

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-23 Thread Olivier Fourdan
Hi Daniel, On Tue, Jan 23, 2018 at 11:15 AM, Daniel Stone wrote: > Ooh. serialNumber == 1 means it's the root pixmap, which will actually > be uselessly empty. It would be interesting to see how we've ended up > here: it would have to be a top-level window which a) was manually > redirected by t

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-23 Thread Daniel Stone
Hi, On 23 January 2018 at 09:42, Olivier Fourdan wrote: > On 22 January 2018 at 19:57, Adam Jackson wrote: >> That can't really be the problem. X drawables are never 0x0. > > Yeap, I don't know how we end with a pximap of size 0×0: > > [...] > (gdb) f 7 > #7 xwl_glamor_pixmap_get_wl_buffer (pix

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-23 Thread Olivier Fourdan
Hey Adam, On 22 January 2018 at 19:57, Adam Jackson wrote: > On Thu, 2018-01-18 at 11:41 +0100, Olivier Fourdan wrote: > > This is a rare occurrence of a crash in Xwayland for which I don't have > > the reproducing steps, just a core file. > > > > The backtrace looks as follow: > > > > [...] >

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-22 Thread Adam Jackson
On Thu, 2018-01-18 at 11:41 +0100, Olivier Fourdan wrote: > This is a rare occurrence of a crash in Xwayland for which I don't have > the reproducing steps, just a core file. > > The backtrace looks as follow: > > #0 raise () from /usr/lib64/libc.so.6 > #1 abort () from /usr/lib64/libc.so.6

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-18 Thread Olivier Fourdan
Hi Daniel, On Thu, Jan 18, 2018 at 12:22 PM, Daniel Stone wrote: > Odd; how could we have a realized 0x0 window which also has damage? I > Hehe, yeap, I had the same question, but didn't find the answer... :) > wonder if this isn't actually a UAF where the xwl_window has since > been unrealiz

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-18 Thread Daniel Stone
Hi Olivier, On 18 January 2018 at 10:41, Olivier Fourdan wrote: > This is a rare occurrence of a crash in Xwayland for which I don't have > the reproducing steps, just a core file. > > The backtrace looks as follow: > > [...] > #6 > #7 xwl_glamor_pixmap_get_wl_buffer () at xwayland-glamo