Bug 68516 - LTC881 - X crashes/cores when using overlays
Summary: LTC881 - X crashes/cores when using overlays
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: XFree86
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-10 20:04 UTC by IBM Bug Proxy
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-07-12 22:11:18 UTC
Embargoed:


Attachments (Terms of Use)

Description IBM Bug Proxy 2002-07-10 20:04:22 UTC
Please fill in each of the sections below.

Hardware Environment:  2-way SMP P4, IBM Intellistation, Matrox G450 video card

Software Environment:  RH 7.1, with XFree86-4.0.3-5


Steps to Reproduce:
1.create a .xinitrc in home directory with "exec fvwm2"
2.run "xinit"
3.open an xtern
4.run "xview -onroot pict.jpg" where pict.jpg is a high color picture
5.open another xterm
6.start the fvwm2 WinList module
7.run emacs from the second xterm

Actual Results:  X crashes/core dumps

Expected Results:  X emacs should start and X should not crash

Additional Information:

I found that two core dumps are possible as a result of the same bug.  Below is 
the "bt" output from gdb from each of the cores.
            
#0  0x080aa50f in CopyColormapAndFree ()                                
#1  0x080ab971 in QueryColors ()                                        
#2  0x080abb58 in FreeClientPixels ()                                   
#3  0x080c41d4 in FreeClientResources ()                                
#4  0x080b6946 in CloseDownClient ()                                    
#5  0x080b0f9b in Dispatch ()                                           
#6  0x080c20fb in main ()                                               
#7  0x4007fe5e in __libc_start_main (main=0x80c1b70 , argc=4,     
.                                                                       
#0  __libc_realloc (oldmem=0xffff, bytes=4) at malloc.c:3243            
#1  0x080d904a in Xrealloc ()                                           
#2  0x080ab613 in FindColor ()                                          
#3  0x080aaa74 in AllocColor ()                                         
#4  0x080b52e6 in ProcAllocColor ()                                     
#5  0x080b0f84 in Dispatch ()                                           
#6  0x080c20fb in main ()                                               
#7  0x4007fe5e in __libc_start_main (main=0x80c1b70 , argc=4,     
.                                                                       
The problem occurs when running X with a 24 bit pixel depth, using      
overlays, and filling up the colormap.  The following patch corrects    
this problem:                                                           
.                                                                       
--- xc/programs/Xserver/hw/xfree86/xf8_32bpp/xf86overlay.c      Fri May 
 3 16:35                                                                
+++ xc/programs/Xserver/hw/xfree86/xf8_32bpp/xf86overlay.c.fix  Fri May 
 3 16:35                                                                
@@ -311,6 +311,7 @@                                                     
.                                                                       
        pmap->red[pScrn->colorKey].refcnt = AllocPrivate;               
        pmap->red[pScrn->colorKey].fShared = FALSE;                     
+       pmap->freeRed--;               
.                                                                       
        color.red = color.blue = color.green = 0;                       
        color.pixel = pScrn->colorKey;                                  
.                                                                       
This patch is already part of the current XFree86 4.2 cvs tree, but was 
added after the official 4.2.0 release in January.

Comment 1 Mike A. Harris 2002-07-12 22:11:13 UTC
Thanks for the patch, I will investigate it and integrate it into
our tree.

Comment 2 Mike A. Harris 2002-07-18 08:37:38 UTC
I've added the patch to rawhide XFree86 4.2.0-53.  Thanks again for pointing
this fix out to us.


Note You need to log in before you can comment on or make changes to this bug.