NetBSD Problem Report #25937

Received: (qmail 19070 invoked by uid 605); 15 Jun 2004 17:12:23 -0000
Message-Id: <20040615171221.E5B7311154@narn.netbsd.org>
Date: Tue, 15 Jun 2004 17:12:21 +0000 (UTC)
From: aniou@smutek.pl
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: aniou@smutek.pl
To: gnats-bugs@gnats.NetBSD.org
Subject: in some cases screen on alpha dumps core 
X-Send-Pr-Version: www-1.0

>Number:         25937
>Category:       pkg
>Synopsis:       in some cases screen on alpha dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    atatat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 15 17:13:00 +0000 2004
>Closed-Date:    Thu Aug 05 13:20:35 +0000 2004
>Last-Modified:  Thu Aug 05 13:20:35 +0000 2004
>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:

From: Andrew Brown <atatat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/25937 CVS commit: pkgsrc/misc/screen
Date: Thu, 15 Jul 2004 04:05:40 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	atatat
 Date:		Thu Jul 15 04:05:40 UTC 2004

 Modified Files:
 	pkgsrc/misc/screen: Makefile distinfo
 	pkgsrc/misc/screen/patches: patch-aj
 Added Files:
 	pkgsrc/misc/screen/patches: patch-ab patch-ac

 Log Message:
 Put the config.h.in patch into its own patch file and add more to it
 that forces varargs to be used on NetBSD.  Some gcc 3.3 instances
 (specifically 3.3.3nb1 on NetBSD/alpha) fail one of the configure
 tests making it think we don't have sprintf() (and therefore no
 varargs) causing unmentionably evil things to be done instead.  This
 usually leads to core dumps.

 Fix a pointer-to-integer cast warning by casting to long in between.
 The actual use case is harmless, but the compiler can't tell that.

 Bump PKGREVISION to 1 for the gcc workaround (affects at least
 NetBSD/alpha which can now build a better screen).

 Addresses PR pkg/25937.


 To generate a diff of this commit:
 cvs rdiff -r1.52 -r1.53 pkgsrc/misc/screen/Makefile
 cvs rdiff -r1.20 -r1.21 pkgsrc/misc/screen/distinfo
 cvs rdiff -r0 -r1.10 pkgsrc/misc/screen/patches/patch-ab
 cvs rdiff -r0 -r1.8 pkgsrc/misc/screen/patches/patch-ac
 cvs rdiff -r1.2 -r1.3 pkgsrc/misc/screen/patches/patch-aj

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback 
State-Changed-By: atatat 
State-Changed-When: Thu Jul 15 04:08:05 UTC 2004 
State-Changed-Why:  
bug is supposedly fixed.  please let us know. 


Responsible-Changed-From-To: pkg-manager->atatat 
Responsible-Changed-By: atatat 
Responsible-Changed-When: Thu Jul 15 04:08:05 UTC 2004 
Responsible-Changed-Why:  
i supposedly fixed the bug. 
State-Changed-From-To: feedback->closed 
State-Changed-By: atatat 
State-Changed-When: Thu Aug 5 13:20:17 UTC 2004 
State-Changed-Why:  
bug is fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.