Bug 267 - X server crashes when X-Resource has to byte-swap
Summary: X server crashes when X-Resource has to byte-swap
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: SPARC Solaris
: high normal
Assignee: Alan Coopersmith
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-03 18:06 UTC by Alan Coopersmith
Modified: 2007-01-23 17:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to xc/programs/Xserver/Xext/xres.c (2.19 KB, patch)
2004-03-03 18:08 UTC, Alan Coopersmith
no flags Details | Splinter Review

Description Alan Coopersmith 2004-03-03 18:06:21 UTC
Running xrestop from a remote host of a different endianness (i.e. sparc <-> x86)
causes the X server to crash in the X-Resource extension code.

Investigatin showed this was because ProcXResQueryClients &
ProcXResQueryClientResources access variables after byte swapping them, 
thus getting very wrong results when using those as offsets into arrays 
and in other calculations.  Changing them to keep a non-byte-swapped copy on
the stack and to use that fixed the crash and allowed xrestop to run.
Comment 1 Alan Coopersmith 2004-03-03 18:08:56 UTC
Created attachment 119 [details] [review]
Patch to xc/programs/Xserver/Xext/xres.c
Comment 2 Alan Coopersmith 2004-03-03 18:13:43 UTC
Fix committed to XORG-CURRENT branch:
  21.  X server crashes when X-Resource has to byte-swap.  Sun bug #5007488.
       freedesktop.org bugzilla #267.  (Alan Coopersmith)
Comment 3 Alan Coopersmith 2004-03-03 18:25:04 UTC
Also reported to XFree86 at http://bugs.xfree86.org/show_bug.cgi?id=1242   


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.