Subject: xsrc/30843: Paste from remote X applications cause remote app to exit/core-dump
To: None <xsrc-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <he@NetBSD.org>
List: netbsd-bugs
Date: 07/26/2005 19:26:00
>Number:         30843
>Category:       xsrc
>Synopsis:       Paste from remote X applications cause remote app to exit/core-dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 26 19:26:00 +0000 2005
>Originator:     Havard Eidnes
>Release:        NetBSD 3.99.7 dated 23 Jul 2005
>Organization:
	Unorganized, Inc.
>Environment:
System: NetBSD vestlia.uninett.no 3.99.7 NetBSD 3.99.7 (GENERIC) #26: Fri Jul 22 01:44:43 CEST 2005 he@quattro.urc.uninett.no:/u/build/HEAD/obj/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	After an upgrade to NetBSD-current with the included xsrc,
	attempts at pasting marked text from remote applications
	cause these applications to exit and/or core-dump.  I've tried
	remote emacs and xterm from remote machines running code from
	the netbsd-2 branch.  With emacs I get a core-dump.  Some of
	the stack backtraces look a little strange, but here are a few
	examples:

(gdb) where
#0  0x4840efeb in kill () from /usr/lib/libc.so.12
#1  0x080cd351 in XMapRaised ()
#2  <signal handler called>
#3  0x4836e53c in XSetClipRectangles () from /usr/X11R6/lib/libX11.so.6
#4  0x080a7997 in XMapRaised ()
#5  0x080a8a99 in XMapRaised ()
#6  0x080aa6f1 in XMapRaised ()
#7  0x080532db in XMapRaised ()

(gdb) where
#0  0x4840efeb in kill () from /usr/lib/libc.so.12
#1  0x080cd351 in XMapRaised ()
#2  <signal handler called>
#3  0x48356252 in XDefaultScreen () from /usr/X11R6/lib/libX11.so.6
#4  0x4832b7d3 in xpmParseDataAndCreate () from /usr/X11R6/lib/libXpm.so.4
#5  0x483274c8 in XpmReadFileToImage () from /usr/X11R6/lib/libXpm.so.4
#6  0x48325464 in XpmReadFileToPixmap () from /usr/X11R6/lib/libXpm.so.4
#7  0x080c095a in XMapRaised ()
#8  0x080beea9 in XMapRaised ()
#9  0x0805e0d4 in XMapRaised ()

(gdb) where
#0  0x4840efeb in kill () from /usr/lib/libc.so.12
#1  0x080cd351 in XMapRaised ()
#2  <signal handler called>
#3  0x4840efeb in kill () from /usr/lib/libc.so.12
#4  0x080cd38e in abort ()
#5  0x0814fa6d in matherr ()
#6  0x080560d4 in XMapRaised ()
#7  0x08056195 in XMapRaised ()
#8  0x08124196 in abort ()
#9  0x0814b4e8 in matherr ()
#10 0x081244b5 in abort ()
#11 0x081240b6 in abort ()
#12 0x0814b4e8 in matherr ()

	With xterm, the application exits with the following error:

xterm:  warning, error event received:
X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Atom id in failed request:  0x127
  Serial number of failed request:  293
  Current serial number in output stream:  295

	Pasting text from local xterms works just fine.
	
>How-To-Repeat:
	Run the X server in -current, corresponding to XFree86 4.5.0,
	watch the above error symptoms.
>Fix:
	Sorry, don't know.
	A possible workaround could possibly be to downgrade xsrc
	to the netbsd-2 version.