Bug 5359 - Segmentation fault when starting Xorg
Summary: Segmentation fault when starting Xorg
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: PowerPC OpenBSD
: high blocker
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 5594 5887 (view as bug list)
Depends on:
Blocks: 5387
  Show dependency treegraph
 
Reported: 2005-12-17 06:27 UTC by Mark Kettenis
Modified: 2006-05-08 07:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix for the problem (506 bytes, patch)
2005-12-17 06:35 UTC, Mark Kettenis
no flags Details | Splinter Review

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.