| Summary: | Missing Screen line in ServerLayout crashes the server | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | xorg | Reporter: | Georgi Mirchev <gmirchev> | ||||||||
| Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||
| Severity: | minor | ||||||||||
| Priority: | medium | ||||||||||
| Version: | 6.8.99.902 (6.9 RC2) | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| i915 platform: | i915 features: | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 17451 [details] [review] 0001-xfree86-return-an-error-if-Screen-is-missing-from-S.patch Return an error when trying to parse the config file and no screen has been specified in the layout. > --- Comment #1 from Peter Hutterer <peter@cs.unisa.edu.au> 2008-06-29 04:16:39 PST ---
> Return an error when trying to parse the config file and no screen has been
> specified in the layout.
>
can't we create a default Screen section (as in the autoconfig case) if
there isn't one in ServerLayout?
Created attachment 17469 [details] [review] 0001-xfree86-handle-missing-Screen-lines-in-the-ServerLa.patch how about this one then? If no Screen is specified in the ServerLayout section, either take the first one from the config file or autogenerate a default screen. Comment on attachment 17469 [details] [review] 0001-xfree86-handle-missing-Screen-lines-in-the-ServerLa.patch This patch has an obvious bug: The second "if" will never succeed. > This patch has an obvious bug: The second "if" will never succeed.
are you referring to the second if (!count)?
count is modified in the while loop between the two hunks (and reset to 0
before that), so the condition that if count == 0 no screen was specified is
correct.
I see. I was looking at the patch only. pushed as fe5cf7cb00fd926cefff933adbdbceea7353f4c2 |
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.
Created attachment 17042 [details] Example xorg.conf to produce the error If in the "ServerLayout" section there is no Screen option the server crashes upon start. The segfault happens in xf86Init.c at this line: GDevPtr configured_device = xf86ConfigLayout.screens->screen->device; Expected behavior is to produce an descriptive error message.