Bug 43247 - Crash in ios handling in common_io.c
Summary: Crash in ios handling in common_io.c
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/pciaccess (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-11-25 10:37 UTC by Daniel Drake
Modified: 2011-11-28 06:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (1.40 KB, patch)
2011-11-25 10:37 UTC, Daniel Drake
no flags Details | Splinter Review

Description Daniel Drake 2011-11-25 10:37:36 UTC
Created attachment 53852 [details] [review]
fix

After upgrading to latest rawhide on the OLPC XO-1.5, X crashes at startup with:

#0  0xa77b7424 in __kernel_vsyscall ()                                          
#1  0xa733e98f in raise () from /lib/libc.so.6                                  
#2  0xa73402d5 in abort () from /lib/libc.so.6                                  
#3  0xa737de3a in __libc_message () from /lib/libc.so.6                         
#4  0xa7384f92 in malloc_printerr () from /lib/libc.so.6                        
#5  0xa7387eaf in _int_realloc () from /lib/libc.so.6                           
#6  0xa7389577 in realloc () from /lib/libc.so.6                                
#7  0xa760025c in ?? () from /usr/lib/libpciaccess.so.0                         
#8  0xa7600553 in pci_legacy_open_io () from /usr/lib/libpciaccess.so.0         
#9  0xa6f715c3 in vgaHWSetStdFuncs () from /usr/lib/xorg/modules/libvgahw.so    
#10 0xa6ff0115 in VIAEnableMMIO (pScrn=0x84cb148) at via_driver.c:5110          
#11 0xa6fed281 in VIAMapMMIO (pScrn=0x84cb148) at via_driver.c:3827             
#12 0xa6fedcc3 in VIAScreenInit (scrnIndex=0, pScreen=0x84c7f60, argc=1,        
    argv=0xafeda404) at via_driver.c:4122                                       
#13 0x08076c4d in AddScreen ()                                                  
#14 0x080cb19c in InitOutput ()                                                 
#15 0x08064290 in ?? ()                                                         
#16 0xa73286b3 in __libc_start_main () from /lib/libc.so.6                      
#17 0x08064779 in _start ()    

The video driver being used is http://dev.laptop.org/git/users/jnettlet/xf86-video-chrome/

I tracked this down to a bug in libpciaccess and its handling of deleting the last io handle. For whatever reason, during initialisation, this driver causes an IO handle to be created, then deleted (== crash), then another one created.

(I have commit access for if this passes review)
Comment 1 Alan Coopersmith 2011-11-26 09:32:26 UTC
Generally we review patches on the xorg-devel mailing list instead
of in bugzilla, but this looks good to me, so you can tag it as
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Comment 2 Daniel Drake 2011-11-28 06:36:20 UTC
Thanks, pushed.


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.