Bug 5359

Summary: Segmentation fault when starting Xorg
Product: xorg Reporter: Mark Kettenis <kettenis>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: high CC: chris.ruehl, pvuorela
Version: git   
Hardware: PowerPC   
OS: OpenBSD   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 5387    
Attachments:
Description Flags
Fix for the problem none

Description Mark Kettenis 2005-12-17 06:27:56 UTC
When starting the Xorg with

# Xorg -configure

the server crashes immediately with a segmentation fault.
Comment 1 Mark Kettenis 2005-12-17 06:35:39 UTC
Created attachment 4113 [details] [review]
Fix for the problem

The crash is caused by bogus code in fixup_vide_driver_list().	In the current
version of the code, the comment

/* if we get here, ati was already ahead of atimisc */

should probably read

/* if we get here, ati was already ahead of atimisc and we crash */

;-).

Seriously though, the problem is that if the list is already correctly sorted,
we end the inner loop because drv == end.  Then the drv++ in the outer loop
gets executed, so drv != end, and the code continues comparing strings beyond
the end of the list.
Comment 2 Adam Jackson 2005-12-21 08:30:35 UTC
applied to modular.  alan, please close when this hits the monolith.
Comment 3 Alan Coopersmith 2005-12-21 09:38:12 UTC
Fixed in monolith too.
Comment 4 Michel Dänzer 2006-05-09 00:04:37 UTC
*** Bug 5887 has been marked as a duplicate of this bug. ***
Comment 5 Michel Dänzer 2006-05-09 00:05:02 UTC
*** Bug 5594 has been marked as a duplicate of this bug. ***

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.