The following reply was made to PR sparc64/6522; it has been noted by GNATS.

From: Matthieu Herrb <[email protected]>
To: Salvador Fandino <[email protected]>
Cc: [email protected]
Subject: Re: sparc64/6522: XChangeProperty broken
Date: Wed, 1 Dec 2010 22:47:55 +0100

 On Wed, Dec 01, 2010 at 08:56:09AM -0800, Salvador Fandino wrote:
 > >Number:         6522
 > >Category:       sparc64
 > >Synopsis:       XChangeProperty broken
 > >Confidential:   yes
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   unknown
 > >Arrival-Date:   Wed Dec 01 18:10:01 GMT 2010
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     
 > >Release:        
 > >Organization:
 > >Environment:
 >     System      : OpenBSD 4.8
 >     Details     : OpenBSD 4.8-current (GENERIC) #175: Mon Nov 29 16:19:56 
 > MST 
 > 2010
 >             
 >  [email protected]:/usr/src/sys/arch/sparc64/compile/GENERIC
 > 
 >     Architecture: OpenBSD.sparc64
 >     Machine     : sparc64
 > >Description:
 > 
 > After upgrading to latest snapshot and also updating all the packages 
 > (pkg_add 
 > -u), two X applications that used to work (icewm and mrxvt) are now failing 
 > in 
 > the same way:
 
 The applications are broken. switching to gcc4 on sparc64 just make
 the bugs more visible, by causing an unaligned access instead of just
 sending random uninitialized data through the X server connection. 
 
 Read the XChangeProperty manual page carefully for details. 
 
 For mrxvt the patch is 
 
 --- init.c~    Wed Dec  1 22:43:45 2010
 +++ init.c     Wed Dec  1 22:43:45 2010
 @@ -3239,7 +3239,7 @@
      XGCValues             gcvalue;
      unsigned long         gcmask;
  #ifndef NO_FRILLS
 -    CARD32                pid = (CARD32) getpid ();
 +    long                  pid = (long) getpid ();
  #endif
  #ifdef TRANSPARENT
      register int          i;
 
 > 
 > $ mrxvt     
 > Bus error 
 > $ gdb mrxvt 
 > GNU gdb 6.3
 > Copyright 2004 Free Software Foundation, Inc.
 > GDB is free software, covered by the GNU General Public License, and you are
 > welcome to change it and/or distribute copies of it under certain conditions.
 > Type "show copying" to see the conditions.
 > There is absolutely no warranty for GDB.  Type "show warranty" for details.
 > This GDB was configured as "sparc64-unknown-openbsd4.8"...(no debugging 
 > symbols 
 > found)
 > 
 > (gdb) r
 > Starting program: /usr/local/bin/mrxvt 
 > (no debugging symbols found)
 > (no debugging symbols found)
 > (no debugging symbols found)
 > b
 > Program received signal SIGBUS, Bus error.
 > 0x000000020fa12ae0 in _XData32 () from /usr/X11R6/lib/libX11.so.14.0
 > (gdb) bt
 > #0  0x000000020fa12ae0 in _XData32 () from /usr/X11R6/lib/libX11.so.14.0
 > #1  0x000000020f9ebf78 in XChangeProperty () from 
 > /usr/X11R6/lib/libX11.so.14.0
 > #2  0x000000000011850c in rxvt_create_show_windows ()
 > #3  0x000000000011f874 in rxvt_init ()
 > #4  0x00000000001260cc in main ()
 > (gdb) 
 > 
 > $ icewm     
 > IceWM: using /home/tester/.icewm for private configuration files
 > Bus error (core dumped) 
 > $ gdb icewm 
 > GNU gdb 6.3
 > Copyright 2004 Free Software Foundation, Inc.
 > GDB is free software, covered by the GNU General Public License, and you are
 > welcome to change it and/or distribute copies of it under certain conditions.
 > Type "show copying" to see the conditions.
 > There is absolutely no warranty for GDB.  Type "show warranty" for details.
 > This GDB was configured as "sparc64-unknown-openbsd4.8"...(no debugging 
 > symbols 
 > found)
 > 
 > (gdb) r
 > Starting program: /usr/local/bin/icewm 
 > (no debugging symbols found)
 > (no debugging symbols found)
 > (no debugging symbols found)
 > (no debugging symbols found)
 > (no debugging symbols found)
 > IceWM: using /home/tester/.icewm for private configuration files
 > 
 > Program received signal SIGBUS, Bus error.
 > 0x00000002056f2ae0 in _XData32 () from /usr/X11R6/lib/libX11.so.14.0
 > (gdb) bt
 > #0  0x00000002056f2ae0 in _XData32 () from /usr/X11R6/lib/libX11.so.14.0
 > #1  0x00000002056cbf78 in XChangeProperty () from 
 > /usr/X11R6/lib/libX11.so.14.0
 > #2  0x000000000012a87c in __register_frame_info ()
 > #3  0x000000000012a87c in __register_frame_info ()
 > Previous frame identical to this frame (corrupt stack?)
 > 
 > >How-To-Repeat:
 > Just running mrxvt or icewm
 > >Fix:
 > None known
 > 
 > 
 > dmesg:
 > OpenBSD 4.8-current (GENERIC) #175: Mon Nov 29 16:19:56 MST 2010
 >     [email protected]:/usr/src/sys/arch/sparc64/compile/GENERIC
 > real mem = 536870912 (512MB)
 > avail mem = 514768896 (490MB)
 > mainbus0 at root: Sun Blade 100 (UltraSPARC-IIe)
 > cpu0 at mainbus0: SUNW,UltraSPARC-IIe (rev 1.4) @ 502 MHz
 > cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 256K external 
 > (64 
 > b/l)
 > psycho0 at mainbus0: pci108e,a001, impl 0, version 0, ign 7c0
 > psycho0: bus range 0-1, PCI bus 0
 > psycho0: dvma map c0000000-dfffffff
 > pci0 at psycho0
 > ebus0 at pci0 dev 12 function 0 "Sun RIO EBus" rev 0x01
 > "flashprom" at ebus0 addr 0-fffff not configured
 > clock1 at ebus0 addr 0-1fff: mk48t59
 > ebus1 at pci0 dev 7 function 0 "Acer Labs M1533 ISA" rev 0x00
 > "dma" at ebus1 addr 0-ffff ivec 0x2a not configured
 > power0 at ebus1 addr 800-82f ivec 0x20
 > com0 at ebus1 addr 3f8-3ff ivec 0x2b: ns16550a, 16 byte fifo
 > com1 at ebus1 addr 2e8-2ef ivec 0x2b: ns16550a, 16 byte fifo
 > gem0 at pci0 dev 12 function 1 "Sun ERI Ether" rev 0x01: ivec 0x7c6, address 
 > 00:03:ba:0d:e0:05
 > ukphy0 at gem0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 
 > 0x0010dd, 
 > model 0x0002
 > "Sun FireWire" rev 0x01 at pci0 dev 12 function 2 not configured
 > ohci0 at pci0 dev 12 function 3 "Sun USB" rev 0x01: ivec 0x7e4, version 1.0, 
 > legacy support
 > alipm0 at pci0 dev 3 function 0 "Acer Labs M7101 Power" rev 0x00: 223KHz 
 > clock
 > iic0 at alipm0
 > "max1617" at alipm0 addr 0x18 skipped due to alipm0 bugs
 > "scm001" at alipm0 addr 0x20 skipped due to alipm0 bugs
 > spdmem0 at iic0 addr 0x50: 512MB SDRAM ECC PC133CL2
 > autri0 at pci0 dev 8 function 0 "Acer Labs M5451 Audio" rev 0x01: ivec 0x7e3
 > ac97: codec id 0x41445348 (Analog Devices AD1881A)
 > ac97: codec features headphone, Analog Devices Phat Stereo
 > audio0 at autri0
 > midi0 at autri0: <4DWAVE MIDI UART>
 > pciide0 at pci0 dev 13 function 0 "Acer Labs M5229 UDMA IDE" rev 0xc3: DMA, 
 > channel 0 configured to native-PCI, channel 1 configured to native-PCI
 > pciide0: using ivec 0x7cc for native-PCI interrupt
 > wd0 at pciide0 channel 0 drive 0: <ST315310A>
 > wd0: 16-sector PIO, LBA, 14594MB, 29888820 sectors
 > atapiscsi0 at pciide0 channel 0 drive 1
 > scsibus0 at atapiscsi0: 2 targets
 > cd0 at scsibus0 targ 0 lun 0: <LITEON, CD-ROM LTN486S, YSU1> ATAPI 5/cdrom 
 > removable
 > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
 > cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
 > pciide0: channel 1 disabled (no drives)
 > machfb0 at pci0 dev 19 function 0 "ATI Rage XL" rev 0x27
 > machfb0: ATY,RageXL, 1024x768
 > wsdisplay0 at machfb0 mux 1: console (std, sun emulation)
 > ppb0 at pci0 dev 5 function 0 "DEC 21152 PCI-PCI" rev 0x03
 > pci1 at ppb0 bus 1
 > usb0 at ohci0: USB revision 1.0
 > uhub0 at usb0 "Sun OHCI root hub" rev 1.00/1.00 addr 1
 > uhidev0 at uhub0 port 4 configuration 1 interface 0 "KEYBOARD USB KB" rev 
 > 1.10/1.01 addr 2
 > uhidev0: iclass 3/1
 > ukbd0 at uhidev0: 8 modifier keys, 6 key codes
 > wskbd0 at ukbd0: console keyboard, using wsdisplay0
 > uhidev1 at uhub0 port 4 configuration 1 interface 1 "KEYBOARD USB KB" rev 
 > 1.10/1.01 addr 2
 > uhidev1: iclass 3/1, 3 report ids
 > uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0
 > uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
 > ums0 at uhidev1 reportid 3: 3 buttons, Z dir
 > wsmouse0 at ums0 mux 0
 > vscsi0 at root
 > scsibus1 at vscsi0: 256 targets
 > softraid0 at root
 > bootpath: /p...@1f,0/i...@d,0/d...@0,0
 > root on wd0a swap on wd0b dump on wd0b
 > WARNING: / was not properly unmounted
 > 
 > usbdevs:
 > Controller /dev/usb0:
 > addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), 
 > Sun(0x108e), 
 > rev 1.00
 >  port 1 powered
 >  port 2 powered
 >  port 3 powered
 >  port 4 addr 2: low speed, power 100 mA, config 1, USB KB(0x6782), 
 > KEYBOARD(0x05d5), rev 1.01
 > 
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 
 -- 
 Matthieu Herrb

Reply via email to