Debian bug report logs - #869, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#869: Many bugs in ncurses have returned
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Tue, 09 May 1995 16:18:07 GMT
Resent-Message-ID: <debian-bugs-handler.869.05091603201229@pixar.com>
X-Debian-PR-Package: ncurses-developer
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 09 May 1995 16:18:07 GMT
Received: with rfc822 via encapsulated-mail id 05091603201229;
          Tue, 09 May 1995 16:03:21 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0s8rD9-0006FLC; Tue, 9 May 95 08:28 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA03856
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 9 May 1995 08:25:32 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0s8q98-000C1AC; Tue, 9 May 95 15:20 BST
Received: by chiark
	id m0s8oKP-0000XQZ
	(Debian /\oo/\ Smail3.1.29.1 #29.31); Tue, 9 May 95 13:23 BST
Message-Id: <m0s8oKP-0000XQZ.ijackson@nyx.cs.du.edu>
Date: Tue, 9 May 95 13:23 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar.com>

Package: ncurses-developer
Version: 1.9.0c-0

I'm afraid I don't have time to go through all of the bugs I've
previously reported (many of which have allegedly been fixed) to see
if they've returned, or which of them have been marked as done.

However, at least the bug reported in the first message in the
attached digest has come back, and I think it was marked as done.

Bruce, could you please look into these problems ?

In general I think it's a very bad idea to assume that the upstream
maintainer has incorporated the patches you have sent to them.  The
way I handle generating a Debian package from a new version of the
upstream package is by applying the debianisation patch to the vanilla
source, and looking at each of the rejected patches to update or
remove them as appropriate.

This also gives me a chance to notice and re-submit any changes that
the upstream maintainer has failed to incorporate.

Ian.

------- start of digest (6 messages) (RFC 934 encapsulation) -------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Overwriting bug in ncurses

Package: ncurses
Version: 1.8.7-1

AAARGH!  It's 2:50am and I've just spent about 3 hours learning how to
use GDB[*] and tracking down an overwriting bug in dselect, and guess
what, it turns out to be in ncurses.  I should have realised it sooner
- - most non-trival bugs in dselect turn out to be in ncurses.  Rant
rant poor quality control rant rant untested code rant rant.

In lib_pad.c, the pnoutrefresh function, there is a loop (control
variable i) which copies data from the pad to the `newscr' screen
variable.

The similar routine in lib_refresh.c, wnoutrefresh, sets the start and
end modified character flags to __NOCHANGE after copying each line.

However, in pnoutrefresh that assignment is outside the loop, causing
it to use the value of the loop variable that caused the loop to exit.
This assignment is to an element of an array that came from malloc,
which is exactly big enough to hold all the information for the pad.

Knowing all that, the results are predictable - sometimes it will
overwrite the start of the next bit of memory.

The patch below appears to solve the problem I was having.

Ian.

[*] My programs rarely have overwriting problems, and I fix almost all
bugs by inspection.  Sometimes a debugging printf or two or the
examination of a corefile from a failed assertaion is necessary.  Did
I really want to know how to set breakpoints, load in extra symbol
tables, &c &c ?

Yes, Bruce, I know about Electric Fence.  It's another one of the
marvellous things that will become possible when I have 0.93R5
installed.  My system is too old and crusty atm.

 --- lib_pad.c~	Sun Feb 26 15:21:40 1995
 +++ lib_pad.c	Mon Mar 27 02:47:27 1995
 @@ -107,10 +107,9 @@
                             newscr->_lastchar[m] = n;
                     }
                 }
 +		win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE;
         }

 -	win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE;
 -
         win->_begx = smincol;
         win->_begy = sminrow;


------------------------------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Bug#564: ncurses has no hooks for SIGWINCH

In my original report, I wrote:
> [...]
> The ncurses library doesn't appear to have any hooks for dealing with
> a SIGWINCH (this is sent by windowing systems - eg xterm - when the
> size of the window has changed).
>
> [...]
> Is it the intent that one should call endwin(), followed by a restart
> using initscr() ?  If so, this should be documented.

This is what dselect now does and it works correctly (for me, anyway),
so I think this is merely a documentation problem.

Ian.

------------------------------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: captoinfo won't compile certain capabilities

Package: ncurses-runtime
Version: 1.8.7-1

The captoinfo command is unhappy with termcap capabilities starting
with certain characters, including @, %, * and ;.

See the transcript below.

Additionally, it reports the errors incorrectly - what the error
message presents as the termcap terminal name is actually the
preceding capability.

Ian.

chiark:~/junk> cat u
#	:%1=\23328~:\
#@0=\2331~:k;=\23321~:*6=\2334~:
go250|graphon-go250|GraphON GO-250:\
	:k5=\23329~:\
	:kl=\233D:kd=\233B:kr=\233C:ku=\233A:\
	:kI=\2332~:kD=\2333~:\
	:kP=\2335~:kN=\2336~:\
	:k6=\23317~:k7=\23318~:k8=\23319~:k9=\23320~:\
	:F1=\23323~:F2=\23324~:F3=\23325~:F4=\23326~:\
	:F7=\23331~:F8=\23332~:F9=\23333~:FA=\23334~:\
	:k1=\217P:k2=\217Q:k3=\217R:k4=\217S:\
	:tc=vt200:
chiark:~/junk> captoinfo u
go250|graphon-go250|GraphON GO-250,
	kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A,
	kdch1=\2333~, kf1=\217P, kf11=\23323~,
	kf12=\23324~, kf13=\23325~, kf14=\23326~,
	kf17=\23331~, kf18=\23332~, kf19=\23333~,
	kf2=\217Q, kf20=\23334~, kf3=\217R, kf4=\217S,
	kf5=\23329~, kf6=\23317~, kf7=\23318~, kf8=\23319~,
	kf9=\23320~, kich1=\2332~, knp=\2336~, kpp=\2335~, use=vt200,
chiark:~/junk> cat t
go250|graphon-go250|GraphON GO-250:\
	:k5=\23329~:\
	:kl=\233D:kd=\233B:kr=\233C:ku=\233A:\
	:kI=\2332~:kD=\2333~:\
	:kP=\2335~:kN=\2336~:\
	:k6=\23317~:k7=\23318~:k8=\23319~:k9=\23320~:\
	:%1=\23328~:\
	:@0=\2331~:k;=\23321~:*6=\2334~:\
	:F1=\23323~:F2=\23324~:F3=\23325~:F4=\23326~:\
	:F7=\23331~:F8=\23332~:F9=\23333~:FA=\23334~:\
	:k1=\217P:k2=\217Q:k3=\217R:k4=\217S:\
	:tc=vt200:
chiark:~/junk> captoinfo t
compile: Warning: near line 7: terminal 'k9', Illegal character - '%'
compile: Warning: near line 7: terminal '%', Illegal character - '5c'
compile: Warning: near line 7: terminal '%', Unknown Capability - '%'
compile: Warning: near line 8: terminal '%', Illegal character - '@'
compile: Warning: near line 8: terminal '@k', Illegal character - '3b'
compile: Warning: near line 8: terminal '@k', Unknown Capability - '@k'
compile: Warning: near line 8: terminal '@k', Illegal character - '='
compile: Warning: near line 8: terminal '=', Illegal character - '2a'
compile: Warning: near line 8: terminal '=', Unknown Capability - '='
compile: Warning: near line 8: terminal '6', Unknown Capability - '6'
go250|graphon-go250|GraphON GO-250,
	kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A,
	kdch1=\2333~, kf1=\217P, kf11=\23323~,
	kf12=\23324~, kf13=\23325~, kf14=\23326~,
	kf17=\23331~, kf18=\23332~, kf19=\23333~,
	kf2=\217Q, kf20=\23334~, kf3=\217R, kf4=\217S,
	kf5=\23329~, kf6=\23317~, kf7=\23318~, kf8=\23319~,
	kf9=\23320~, kich1=\2332~, knp=\2336~, kpp=\2335~, use=vt200,
chiark:~/junk>
------------------------------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Re: Bug#841: dselect from dpkg 0.93.34 says "error opening terminal:  console."

Bill Mitchell writes:
> PACKAGE: dpkg
> VERSION: 0.93r4
>
> dselect won't start up.  It complains of "error opening terminal",
> nomatter what I set TERM to.  Other programs which use /etc/termcap
> (e.g., git) work OK.

Bruce, can that message be improved, perhaps to mention that it's
trying to use terminfo ?  Since it's a Debian ncurses package you
could even say to install the `ncurses-runtime' package.  Something
like:

 Terminal type `bbc-phx' is not defined in the terminfo database.
 Please (re)set your TERM variable, or install terminfo data for this
 terminal.  Most terminfos can be found in the `ncurses-runtime' package.

Ian.
------------------------------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Overwriting bug in ncurses (Bug#659) returns !

Package: ncurses-developer, ncurses-runtime
Version: 1.9.0c

The overwriting bug I reported as Bug#659 and supplied a patch for
(see below) has returned in ncurses 1.9.0c.

I enclose a revised patch.

Also, it seems that the .o files in libncurses.a are compiled with -O
- -- IMO this should be -O2.

Ian.

 --- src/lib_pad.c~	Wed May  3 11:41:11 1995
 +++ src/lib_pad.c	Wed May  3 11:42:56 1995
 @@ -139,9 +139,8 @@
                             newscr->_line[m].lastchar = n;
                     }
                 }
 +		win->_line[i].firstchar = win->_line[i].lastchar = _NOCHANGE;
         }
 -
 -	win->_line[i].firstchar = win->_line[i].lastchar = _NOCHANGE;

         win->_begx = smincol;
         win->_begy = sminrow;

- ------- start of forwarded message (RFC 934 encapsulation) -------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Overwriting bug in ncurses

Package: ncurses
Version: 1.8.7-1

[...]
In lib_pad.c, the pnoutrefresh function, there is a loop (control
variable i) which copies data from the pad to the `newscr' screen
variable.

The similar routine in lib_refresh.c, wnoutrefresh, sets the start and
end modified character flags to __NOCHANGE after copying each line.

However, in pnoutrefresh that assignment is outside the loop, causing
it to use the value of the loop variable that caused the loop to exit.
This assignment is to an element of an array that came from malloc,
which is exactly big enough to hold all the information for the pad.

Knowing all that, the results are predictable - sometimes it will
overwrite the start of the next bit of memory.

The patch below appears to solve the problem I was having.

Ian.

[ old diff deleted to avoid confusing patch ]

- ------- end -------
------------------------------
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: screen corruption bug in ncurses

Package: ncurses-developer
Version: 1.9.0c-0

To reproduce: download and compile dselect in dpkg-0.93.39alpha.tar.gz
(this will be on ftp.cps shortly).

Run it as a normal user with no arguments.

Press `2' to select the `list' option and `return' to confirm it.
Press `space' three times to scroll down the package list.
Press `q' to quit from the package list.

You will see that the main menu is corrupted; parts of the package
list display are peeping through in some of the spaces !

621a2cefeb3e292257ff60d17ec8884c  dpkg-0.93.39alpha.tar.gz
- -rw-rw-r--   1 ian      ian        173066 May  3 12:34 dpkg-0.93.39alpha.tar.gz

Ian.
------- end -------


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#869: Acknowledgement (was: Many bugs in ncurses have returned)
In-Reply-To: <m0s8oKP-0000XQZ.ijackson@nyx.cs.du.edu>
References: <m0s8oKP-0000XQZ.ijackson@nyx.cs.du.edu>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#869" or "Re: Bug#869" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 06:43:02 GMT Wed 21 Jun