Bug 8417

Summary: Xephyr crashed on startup X86_64 (segfault)
Product: xorg Reporter: Vladimir <kv11111>
Component: Server/DDX/XephyrAssignee: Matthew Allum <mallum>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: bugs.freedesktop.org, faure, fredrik, jcristau, mike, shausman
Version: 7.1 (2006.05)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Fixes crash of Xephyr on amd64
none
Fixes KD_MAX_KEYCODE value (and crash in certain environments) none

Description Vladimir 2006-09-25 10:55:25 UTC
The bug is in the hw/kdrive/ephyr/hostx.c: it is compiled without _XSERVER64 
being defined, so KeySym is 64bit wide and kdKeymap is defined as extern 
pointer to 64bit KeySym. But it is actually defined in other file as pointer to 
32bit KeySym.

The second problem is that KD_MAX_KEYCODE in hw/kdrive/src/kkeymap.h is defined 
to be 254, but according to XDisplayKeycodes documentation it should be 255.

I'm attaching to patches to fix this problems.
Comment 1 Vladimir 2006-09-25 10:55:57 UTC
Created attachment 7149 [details] [review]
Fixes crash of Xephyr on amd64
Comment 2 Vladimir 2006-09-25 10:56:57 UTC
Created attachment 7150 [details] [review]
Fixes KD_MAX_KEYCODE value (and crash in certain environments)
Comment 3 David Faure 2007-01-10 08:26:17 UTC
I can confirm that the patch 
(https://bugs.freedesktop.org/attachment.cgi?id=7149) works here (kubuntu-6.10, 
amd64).
But stdint.h is only C99 so this might not be a very portable fix.
Comment 4 Daniel Stone 2007-02-27 01:33:42 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Mike McQuaid 2007-04-12 12:30:23 UTC
Has a patch been put in GIT to fix this?
Gentoo downstream is looking for an "official" patch before inclusion.
Comment 6 Julien Cristau 2007-04-12 12:42:33 UTC
(In reply to comment #5)
> Has a patch been put in GIT to fix this?
> Gentoo downstream is looking for an "official" patch before inclusion.
> 
it's in the master branch:
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=68d39d8571d8717d26cedc84015d537549520a14
Comment 7 Mike McQuaid 2007-05-15 06:03:35 UTC
I see the named bug is still in xorg-server-1.3 even after thought that patch has been applied to the tree for 1.3.

Any news/updates?
Comment 8 Dodji Seketeli 2007-08-18 01:59:32 UTC
Okay I will close the bug for now, as it seems to have been fixed by http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=68d39d8571d8717d26cedc84015d537549520a14 .

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.