Summary: | Segfault when running Xorg --help | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Kjartan Maraas <kmaraas> | ||||
Component: | Server/General | Assignee: | Tiago Vignatti <tiago.vignatti> | ||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | medium | CC: | peter.hutterer | ||||
Version: | unspecified | ||||||
Hardware: | Other | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 23613 | ||||||
Attachments: |
|
Description
Kjartan Maraas
2009-09-17 04:15:50 UTC
This should be fixed by the following commit in libpciaccess, as far as I can tell: commit 42b879a203c1c16daa9d0c610c6a217ead7a5829 Author: Dave Airlie <airlied@linux.ie> Date: Wed Sep 2 19:03:11 2009 +1000 vgaarb: check pci_sys exists before initing vga arb > --- Comment #1 from Julien Cristau <jcristau@debian.org> 2009-09-17 04:32:47 PST ---
> This should be fixed by the following commit in libpciaccess, as far as I can
> tell:
scratch that. the problem is calling the vgaarb_fini function when
pci_system_init hasn't been called.
Created attachment 29652 [details] [review] 0001-xfree86-don-t-clean-up-the-arbiter-if-we-never-initi.patch something simple like this should do the job. (In reply to comment #3) > Created an attachment (id=29652) [details] > 0001-xfree86-don-t-clean-up-the-arbiter-if-we-never-initi.patch > > something simple like this should do the job. > I just push a patch in the pci library - makes more sense to fix there. Should be fixed now. > --- Comment #4 from Tiago Vignatti <tiago.vignatti@nokia.com> 2009-09-18 03:00:47 PST ---
> I just push a patch in the pci library - makes more sense to fix there. Should
> be fixed now.
i'm not sure it makes more sense. it seems ok to me for libpciaccess to
assume that pci_device_vgaarb_fini won't be called if
pci_device_vgaarb_init wasn't called (and successful).
(In reply to comment #5) > > --- Comment #4 from Tiago Vignatti <tiago.vignatti@nokia.com> 2009-09-18 03:00:47 PST --- > > I just push a patch in the pci library - makes more sense to fix there. Should > > be fixed now. > > i'm not sure it makes more sense. it seems ok to me for libpciaccess to > assume that pci_device_vgaarb_fini won't be called if > pci_device_vgaarb_init wasn't called (and successful). We usually assume that users (e.g. Xorg or human) can make unpredictable stupid things. So that's why I prefered to protect the library instead the application. On the other hand, following your thinking, we would just have to ignore this bug because the reporter was wrongly calling X server's argument, using --help instead -help :) On Fri, Sep 18, 2009 at 03:56:24 -0700, bugzilla-daemon@freedesktop.org wrote: > --- Comment #6 from Tiago Vignatti <tiago.vignatti@nokia.com> 2009-09-18 03:56:24 PST --- > On the other hand, following your thinking, we would just have to ignore this > bug because the reporter was wrongly calling X server's argument, using --help > instead -help :) i'm not sure what this is following, but certainly not my thinking. (In reply to comment #6) > We usually assume that users (e.g. Xorg or human) can make unpredictable stupid > things. So that's why I prefered to protect the library instead the > application. IMO, the correct fix is to make sure we don't do anything stupid (i.e. my patch) and to fail gracefully if it happens nonetheless (libpciaccess commit). this is the server, not some random user input that we can't validate beforehand. > On the other hand, following your thinking, we would just have to ignore this > bug because the reporter was wrongly calling X server's argument, using --help > instead -help :) this makes no sense. if you pass in an argument that doesn't parse the server should _not_ segfault. |
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.