Bug 1138

Summary: composite crash in Polyline.
Product: xorg Reporter: Jim Gettys <jg>
Component: Server/GeneralAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: high CC: ajax, keithp
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 351    
Attachments:
Description Flags
cw-wrapfuncs.diff none

Description Jim Gettys 2004-08-19 13:48:58 UTC
x11perf -repeat 1 -wddline100 -display :0

gets:

Program received signal SIGSEGV, Segmentation fault.
0x0816a67a in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:244
244         SETUP_BACKING_DST(pDst, pGC);
(gdb) where
#0  0x0816a67a in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:244
#1  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#2  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#3  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#4  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#5  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#6  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
    ppt=0x878cde0) at cw_ops.c:253
#7  0x0816a7a5 in cwPolylines (pDst=0x878ea78, pGC=0x878efe8, mode=0, npt=101,
Comment 1 Jim Gettys 2004-08-19 13:51:14 UTC
Eric asked for this.
Comment 2 Eric Anholt 2004-08-20 22:05:37 UTC
Created attachment 693 [details] [review]
cw-wrapfuncs.diff

This bug was caused by a path where when cwPolylines called down, somebody
(probably mi) called ChangeGC/ValidateGC on the same GC before doing some
setspans.  Because the cw ops didn't unwrap funcs, this hit cwValidateGC, which
re-wrapped the ops, causing a loop.  As far as I understand, the "somebody" is
violating the current rules as described in bug #1045.	However, given the late
time in the release cycle we're at, the attached patch to unwrap/rewrap funcs
in the ops will fix the problem.
Comment 3 Adam Jackson 2004-08-24 15:54:58 UTC
reproducible here.  eric's patch makes the pain go away.
Comment 4 Adam Jackson 2004-08-24 17:45:38 UTC
it breaks composite though.
Comment 5 Eric Anholt 2004-08-26 13:33:35 UTC
Committed a patch that actually works.  Apologies to those who tested the
previous patch, which was obviously broken.

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.