xwininfo segfaults if given a non-existent screen with -display option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
X11 Utils |
Fix Released
|
Medium
|
|||
x11-utils (Fedora) |
Won't Fix
|
Undecided
|
|||
x11-utils (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Unassigned | ||
Quantal |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
xwininfo segfaults if called with an out-of-range display number.
[Test Case]
1. xwininfo -root -display :0.0
2. xwininfo -root -display :0.1
Actual Behavior:
* First command passes
* Second command segfaults
Expected Behavior:
* First command passes
* Second command returns an error message without segfaulting
[Fix]
The proposed patch works as is and is proposed for both precise and quantal.
[Regression Potential]
The patch is small and only affects an error condition check, so the chance of a regression seems very small. xwininfo is not widely used, so the impact of a regression would be minimal as well.
[Original Report]
I have a dual-head setup that only presents one "screen" to X (subdivided by xinerama).
If I run xwininfo -root -display :0.0 it works as expected, giving the root window information for my single "screen".
If I run xwininfo -root -display :0.1 it segfaults.
I expect it to exit gracefully with an error message. On Ubuntu 8.04 this error message used to be "cannot open display :0.1".
The problem could lie in libxcb (I'm no expert) xcb_connection_
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: x11-utils 7.6+4
ProcVersionSign
Uname: Linux 3.2.0-27-generic x86_64
NonfreeKernelMo
.proc.driver.
.proc.driver.
.proc.driver.
NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.49 Mon Apr 30 23:46:33 PDT 2012
GCC version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
.tmp.unity.
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
CompizPlugins: [core,composite
CompositorRunning: None
Date: Tue Jul 24 16:37:34 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
DkmsStatus:
nvidia-current, 295.40, 3.2.0-23-generic, x86_64: installed
nvidia-current, 295.40, 3.2.0-26-generic, x86_64: installed
nvidia-current, 295.40, 3.2.0-27-generic, x86_64: installed
nvidia-
GraphicsCard:
NVIDIA Corporation G98 [Quadro NVS 295] [10de:06fd] (rev a1) (prog-if 00 [VGA controller])
Subsystem: NVIDIA Corporation Device [10de:062e]
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
JockeyStatus:
xorg:nvidia_
xorg:nvidia_
MachineType: Dell Inc. Precision WorkStation T3500
ProcEnviron:
LANGUAGE=en_AU:en
TERM=xterm
PATH=(custom, user)
LANG=en_AU.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: x11-utils
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/12/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A07
dmi.board.name: 09KPNV
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 7
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: Precision WorkStation T3500
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.7.
version.ia32-libs: ia32-libs 20090808ubuntu36
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.
version.
version.
version.
version.
version.
version.
version.
version.
Changed in x11-utils (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in x11-utils (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
Changed in x11-utils: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in x11-utils: | |
status: | Confirmed → In Progress |
Changed in x11-utils: | |
status: | In Progress → Fix Released |
Changed in x11-utils (Fedora): | |
importance: | Unknown → Undecided |
status: | Unknown → Won't Fix |
The attachment "Patch against x11-utils-7.6+4" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]