Subject: Re: Bus errors on -current with certain X11 apps
To: Michael-John Turner <mj@turner.org.za>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 12/28/2006 13:25:32
On Thu, Dec 28, 2006 at 01:38:33PM +0200, Michael-John Turner wrote:
> #0  0x000000000013006c in _XData32 ()
> #1  0x000000000013f9e4 in XChangeProperty ()

This is a typical X application programming error. Let me avoid harsh words
about the Xlib API here, but XChangeProperty when passed a "format" value of
32 does not, as you might naively expect, transfer a 32 bit value, but a
"long" value. Now on sparc64 a long is 64 bit and requires different 
alignment than a 32bit value.

Many X programmers eroneously try to change things like "Atom32" (which realy
is a 32bit value) via format=32. This can not work. You need to store the
value temporarily in a long variable (or array of long).

Martin