On Wed, 1 Dec 2010 13:57:15 -0800, Aaron Plattner <[email protected]> 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 <[email protected]> > > 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 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
