rendercheck segfaults [Re: rendercheck: 10 commits]
Chris Wilson
chris at chris-wilson.co.uk
Wed Dec 1 14:27:16 PST 2010
On Wed, 1 Dec 2010 13:57:15 -0800, Aaron Plattner <aplattner at nvidia.com> wrote:
> On Wed, Dec 01, 2010 at 01:47:47PM -0800, Chris Wilson wrote:
> > On Wed, 1 Dec 2010 13:06:47 -0800, Aaron Plattner <aplattner at nvidia.com> wrote:
> > > This series causes a segmentation fault in blend_test because the loop
> > > at the top of the "while (k < num_dst)" loop doesn't ever increment y
> > > because num_src is 325 and win_height is only 200.
> >
> > I've pushed a fixed version of blend and composite that I tested with
> > windows both larger and smaller than num_src.
>
> Thanks, Chris. Unfortunately, it still crashes later:
>
> (gdb) b t_blend.c:80
> Breakpoint 1 at 0x406cc5: file t_blend.c, line 80.
> (gdb) condition 1 y == 0
> (gdb) r
>
> Breakpoint 1, blend_test (dpy=0x610010, win=0x7fffffffe070, dst=0x61e730, op=0x628030, num_op=38,
> src_color=0x6280d0, num_src=325, dst_color=0x629510, num_dst=165) at t_blend.c:80
> 80 image = XGetImage(dpy, dst->d,
> (gdb) i local
> image = 0x629a60
> k0 = 165
> this_src = 163
> rem_src = 163
> expected = {r = 0, g = 0, b = 0, a = 0.49803921568627452}
> tested = {r = 0, g = 0, b = 0, a = 0.50196078431372548}
> tdst = {r = 0, g = 0, b = 0, a = 0.50196078431372548}
> testname = "\200g\211\367\377\177\000\000\004\000\000\000\000\000\000\000\004\000\000"
> i = 38
> j = 162
> k = 165
> y = 0
> iter = 1
> page = 1
> num_pages = 2
So we were advancing through the dst_color array too fast and so ended up
skipping the final page: y = 0 => BOOM.
I have no idea how this worked for me, but I've pushed another attempt to
correctly handle a window smaller than num_src.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the xorg-devel
mailing list