Bug 461666

Summary: Crash in X.org server during a resolution change (monitor hotplug) in VirtualBox
Product: [Fedora] Fedora Reporter: Michael T <raselmsh>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: raselmsh, xgl-maint
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.5.0 upstream Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-16 19:27:14 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Michael T 2008-09-09 15:25:18 EDT
Description of problem: Dynamically changing resolution (this uses xrandr after a simulated monitor change) in a Fedora 9 guest inside VirtualBox 2.0.2 with guest additions can cause the X server to segfault.  Fix below.


Version-Release number of selected component (if applicable):
1.4.99.902

How reproducible:
Easily

Steps to Reproduce:
1. Install Fedora 9 as a guest inside VirtualBox 2.0.2
2. Install the Guest Additions
3. Resize the VirtualBox window a few times, or switch into or out of seamless mode.
  
Actual results:
The X server crashes

Expected results:
No crash

Additional info:
The problem is in the function xf86SetScrnInfoModes() in xorg-server-1.4.99.902/hw/xfree86/modes/xf86Crtc.c

Lines 1707-1709 of the file read:
    for (mode = scrn->modes; mode; mode = mode->next)
        if (xf86ModesEqual (mode, &crtc->desiredMode))
            break;

However, the value of crtc can be NULL.  These lines should be prefixed with

if (crtc)

Note that this bug is fixed in the release version of X.org server 1.5.0.
Comment 1 Fedora Update System 2008-09-14 02:50:21 EDT
xorg-x11-server-1.5.0-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xorg-x11-server'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8032
Comment 2 Fedora Update System 2008-09-16 19:26:48 EDT
xorg-x11-server-1.5.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.