Subject: pkg/25937: in some cases screen on alpha dumps core
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <aniou@smutek.pl>
List: pkgsrc-bugs
Date: 06/15/2004 17:12:21
>Number:         25937
>Category:       pkg
>Synopsis:       in some cases screen on alpha dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 15 17:13:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Piotr Meyer
>Release:        2.0_BETA
>Organization:
>Environment:
NetBSD tiferet.supermedia.pl 2.0_BETA NetBSD 2.0_BETA (TIFERET) #2: Sun Jun 13 09:24:13 UTC 2004  aniou@tiferet.supermedia.pl:/usr/src/sys/arch/alpha/compile/TIFERET alpha
>Description:
When screen try to resume provious session (-r) without sessions
detached screen dump core ('./screen' becose I try on non-stripped
binary in work dir), screen is compiled from pkgsrc:

tiferet: {79} pkg_info screen
Information for screen-4.0.2:

Comment:
Multi-screen window manager
[...]

tiferet: {80} ./screen -r
pid 1161 (screen): unaligned access: va=0x1ffffda04 pc=0x12001a268 ra=0x12001a26
0 sp=0x1ffffd968 op=ldq
Segmentation fault (core dumped)
tiferet: {81} gdb ./screen -c screen.core
GNU gdb 5.3nb1
Copyright 2002 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 "alpha--netbsd"...(no debugging symbols found)...
Core was generated by `screen'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols found)...
done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/lib/libcurses.so.6...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libcurses.so.6
Reading symbols from /usr/lib/libutil.so.7...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libutil.so.7
Reading symbols from /usr/lib/libcrypt.so.0...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.12
#0  0x00000001601e5284 in strlen () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00000001601e5284 in strlen () from /usr/lib/libc.so.12
#1  0x000000012001a1e4 in xvsnprintf ()
#2  0x0000000120019fd4 in xsnprintf ()
#3  0x00000001200076d0 in Panic ()
#4  0x00000001200300a0 in Attach ()
#5  0x0000000120004714 in main ()
#6  0x00000001200034e8 in __start ()
#7  0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so
#8  0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so
#9  0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so
#10 0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so
#11 0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so
#12 0x0000000160074f98 in _rtld_start () from /usr/libexec/ld.elf_so

In other cases screen working fine.


>How-To-Repeat:
Compile screen (ex. from pkgsrc) and try (without olders, detached
sessions):
$ screen -r


>Fix:
I don't know :-/ In google I found only one link, but problem is similar (also screen on alpha) - but under Linux. 

http://64.233.167.104/search?q=cache:KwU50qWGaQYJ:www.alphalinux.org/archives/axp-list/1998/September1998/1009.html+xvsnprintf+alpha&hl=en

>Release-Note:
>Audit-Trail:
>Unformatted: