NetBSD Problem Report #44692
From www@NetBSD.org Sun Mar 6 23:31:05 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 2CA9C63B942
for <gnats-bugs@gnats.NetBSD.org>; Sun, 6 Mar 2011 23:31:05 +0000 (UTC)
Message-Id: <20110306233103.ECC8063B92A@www.NetBSD.org>
Date: Sun, 6 Mar 2011 23:31:03 +0000 (UTC)
From: alnsn@yandex.ru
Reply-To: alnsn@yandex.ru
To: gnats-bugs@NetBSD.org
Subject: top(1) crashes inside window(1)
X-Send-Pr-Version: www-1.0
>Number: 44692
>Category: bin
>Synopsis: top(1) crashes inside window(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 06 23:35:00 +0000 2011
>Closed-Date: Thu Apr 21 08:57:02 +0000 2011
>Last-Modified: Thu Apr 21 08:57:02 +0000 2011
>Originator: Alexander Nasonov
>Release: NetBSD 5.99.47 amd64
>Organization:
home sweet home
>Environment:
NetBSD nebeda.localdomain 5.99.47 NetBSD 5.99.47 (GENERIC) #0: Sun Feb 27 15:04:35 GMT 2011 root@nebeda.localdomain:/home/alnsn/src/netbsd-current/src/sys/arch/amd64/compile/obj/GENERIC amd64
>Description:
Screenshot:
─1──────────────────────────────────────────────────────────────────────────────
Escape character is ^P.
[window-v2 ttyp8] top
Memory fault (core dumped)
SEGV
[window-v2 ttyp8]
─2──────────────────────────────────────────────────────────────────────────────
e.
Loaded symbols for /usr/libexec/ld.elf_so
Core was generated by `top'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f7ff68c4bd7 in strcpy () from /usr/lib/libc.so.12
(gdb) bt
#0 0x00007f7ff68c4bd7 in strcpy () from /usr/lib/libc.so.12
#1 0x00000000004072da in screen_readtermcap ()
#2 0x0000000000407e05 in main ()
(gdb)
>How-To-Repeat:
I login from Windows with putty and then I do
$ window
$ top
more(1) crashes too.
>Fix:
Not known
>Release-Note:
>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: re: bin/44692: top(1) crashes inside window(1)
Date: Mon, 07 Mar 2011 10:44:30 +1100
this happens because tgoto() returns NULL at this point:
screen.c:317 (void) strcpy(home, tgoto(tc_cursor_motion, 0, 0));
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: re: bin/44692: top(1) crashes inside window(1)
Date: Mon, 07 Mar 2011 10:46:14 +1100
i guess this is a bug in the new terminfo tgoto(). it works fine
in netbsd-5.
.mrg.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
alnsn@yandex.ru
Cc:
Subject: re: bin/44692: top(1) crashes inside window(1)
Date: Sun, 6 Mar 2011 19:31:34 -0500
On Mar 6, 11:50pm, mrg@eterna.com.au (matthew green) wrote:
-- Subject: re: bin/44692: top(1) crashes inside window(1)
| i guess this is a bug in the new terminfo tgoto(). it works fine
| in netbsd-5.
This is a bug in captoinfo(). It does not translate the % sequences in
cursor motion. In this case in terminfo %+ means push(pop() + pop()) and
it termcap means push(pop() + nextchar()). I don't think that cursor motion
(cm) works at all in $TERMCAP right now since there is no % escape translation
in captoinfo() in termcap.c
christos
From: "Roy Marples" <roy@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44692 CVS commit: src/lib/libterminfo
Date: Thu, 10 Mar 2011 10:17:19 +0000
Module Name: src
Committed By: roy
Date: Thu Mar 10 10:17:19 UTC 2011
Modified Files:
src/lib/libterminfo: termcap.c terminfo.5.in
Log Message:
Add support for translating the following termcap commands into terminfo:
%B %D %r %2 %3 %d %+ %> %.
Fixes PR bin/44692.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libterminfo/termcap.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libterminfo/terminfo.5.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
alnsn@yandex.ru
Cc:
Subject: Re: PR/44692 CVS commit: src/lib/libterminfo
Date: Thu, 10 Mar 2011 11:01:25 -0500
On Mar 10, 10:20am, roy@netbsd.org ("Roy Marples") wrote:
-- Subject: PR/44692 CVS commit: src/lib/libterminfo
You are the man!
| Log Message:
| Add support for translating the following termcap commands into terminfo:
| %B %D %r %2 %3 %d %+ %> %.
| Fixes PR bin/44692.
According to the manual page we have:
The % encodings have the following meanings:
%% output `%'
%d output value as in printf(3) %d
%2 output value as in printf(3) %2d
%3 output value as in printf(3) %3d
%. output value as in printf(3) %c
%+x add x to value, then do %.
%>xy if value > x then add y, no output
%r reverse order of two parameters, no output
%i increment by one, no output
%n exclusive-or all parameters with 0140 (Datamedia 2500)
%B BCD (16*(value/10)) + (value%10), no output
%D Reverse coding (value - 2*(value%16)), no output (Delta Data).
Are all of these supported now?
christos
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
alnsn@yandex.ru
Cc:
Subject: Re: PR/44692 CVS commit: src/lib/libterminfo
Date: Thu, 10 Mar 2011 11:06:08 -0500
On Mar 10, 11:01am, christos@zoulas.com (Christos Zoulas) wrote:
-- Subject: Re: PR/44692 CVS commit: src/lib/libterminfo
| | Log Message:
| | Add support for translating the following termcap commands into terminfo:
| | %B %D %r %2 %3 %d %+ %> %.
| | Fixes PR bin/44692.
|
|
| According to the manual page we have:
|
| The % encodings have the following meanings:
|
| %% output `%'
| %d output value as in printf(3) %d
| %2 output value as in printf(3) %2d
| %3 output value as in printf(3) %3d
| %. output value as in printf(3) %c
| %+x add x to value, then do %.
| %>xy if value > x then add y, no output
| %r reverse order of two parameters, no output
| %i increment by one, no output
| %n exclusive-or all parameters with 0140 (Datamedia 2500)
| %B BCD (16*(value/10)) + (value%10), no output
| %D Reverse coding (value - 2*(value%16)), no output (Delta Data).
|
|
| Are all of these supported now?
And since we are supporting termcap escapes now, isn't it better to re-instate
termcap(5)? It is the only source of information for them and the web pages
are lacking.
christos
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 21 Apr 2011 04:47:53 +0000
State-Changed-Why:
Fixed?
From: Alexander Nasonov <alnsn@yandex.ru>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, dholland@NetBSD.org,
alnsn@yandex.ru
Subject: Re: bin/44692 (top(1) crashes inside window(1))
Date: Thu, 21 Apr 2011 08:52:54 +0100
dholland@NetBSD.org wrote:
> Fixed?
Yes.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 21 Apr 2011 08:57:02 +0000
State-Changed-Why:
Confirmed fixed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.