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.
Created attachment 119 [details] [review] Patch to xc/programs/Xserver/Xext/xres.c
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)
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.