Memory leak in fedora 8 xorg server 1.3
Barry Scott
barry.scott at onelan.co.uk
Tue Dec 23 09:28:05 PST 2008
I have found the leak.
At line 202 in miext/cw/cw_ops.c we have:
(*pBackingGC->ops->CopyArea)(pBackingSrc, pBackingDst,
pBackingGC, srcx, srcy, w, h,
dstx, dsty);
The RegionRec that is returned is lost.
Here is the stack trace of the allocation:
Breakpoint 1, 0x005cf941 in fbDoCopy (pSrcDrawable=0x9423608,
pDstDrawable=0x9423608, pGC=0x9423820, xIn=2, yIn=0,
widthSrc=30, heightSrc=40, xOut=0, yOut=0, copyProc=0x5f64a0
<exaCopyNtoN>, bitPlane=0, closure=0x0)
at fbcopy.c:598
warning: Source file is more recent than executable.
598 prgnExposed = miHandleExposures(pSrcDrawable,
pDstDrawable, pGC,
(gdb) bt
#0 0x005cf941 in fbDoCopy (pSrcDrawable=0x9423608,
pDstDrawable=0x9423608, pGC=0x9423820, xIn=2, yIn=0, widthSrc=30,
heightSrc=40, xOut=0, yOut=0, copyProc=0x5f64a0 <exaCopyNtoN>,
bitPlane=0, closure=0x0) at fbcopy.c:598
#1 0x005f649c in exaCopyArea (pSrcDrawable=0x9423608,
pDstDrawable=0x9423608, pGC=0x9423820, srcx=2, srcy=0,
width=30, height=40, dstx=0, dsty=0) at exa_accel.c:479
#2 0x0817751a in cwCopyArea (pSrc=0x9423608, pDst=0x9423608,
pGC=0x9423820, srcx=2, srcy=0, w=30, h=40, dstx=0,
dsty=0) at cw_ops.c:202
#3 0x08173515 in damageCopyArea (pSrc=0x9423608, pDst=0x9423608,
pGC=0x9423820, srcx=2, srcy=0, width=30, height=40,
dstx=0, dsty=0) at damage.c:830
#4 0x08086a0a in ProcCopyArea (client=0x94222f0) at dispatch.c:1745
#5 0x08150ca1 in XaceCatchDispatchProc (client=0x94222f0) at xace.c:281
#6 0x0808887a in Dispatch () at dispatch.c:457
#7 0x080705aa in main (argc=14, argv=0xbffcc5a4, envp=Cannot access
memory at address 0x61
) at main.c:451
Is the fix as simple as calling miRegionDestory on the returned
RegionPtr from (CopyArea)?
Barry
More information about the xorg
mailing list