NetBSD Problem Report #56767

From www@netbsd.org  Sat Mar 26 02:13:31 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C1F671A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 26 Mar 2022 02:13:30 +0000 (UTC)
Message-Id: <20220326021329.33D1B1A9239@mollari.NetBSD.org>
Date: Sat, 26 Mar 2022 02:13:29 +0000 (UTC)
From: roland.illig@gmx.de
Reply-To: roland.illig@gmx.de
To: gnats-bugs@NetBSD.org
Subject: libcurses messes up screen with MALLOC_CONF=junk:true
X-Send-Pr-Version: www-1.0

>Number:         56767
>Category:       lib
>Synopsis:       libcurses messes up screen with MALLOC_CONF=junk:true
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 26 02:15:00 +0000 2022
>Closed-Date:    Mon Mar 28 19:54:56 +0000 2022
>Last-Modified:  Mon Mar 28 19:54:56 +0000 2022
>Originator:     Roland Illig
>Release:        9.99.95
>Organization:
>Environment:
NetBSD nb8.roland-illig.de 9.99.95 NetBSD 9.99.95 (GENERIC) #0: Thu Mar 24 02:24:25 UTC 2022  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
In my -current environment on x86_64, I have set MALLOC_CONF=junk:true, to catch memory allocation bugs while developing.

Today I noticed that cgram(6) and ncdu(1) mess up the screen contents when I run them with TERM=xterm MALLOC_CONF=junk:true.  Without MALLOC_CONF, everything is fine.

Running ncdu with libcurses.so.8 works fine but ncdu with libcurses.so.9 doesn't remove ncdu's "Scanning..." window after scanning the files has finished.

In cgram(6) with libcurses.so.9, only the first word of each line is shown.

The bug has probably been introduced after 2021-05-01 since at that time I tested cgram thoroughly.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56767 CVS commit: src/lib/libcurses
Date: Sat, 26 Mar 2022 16:03:02 +0000

 Module Name:	src
 Committed By:	uwe
 Date:		Sat Mar 26 16:03:02 UTC 2022

 Modified Files:
 	src/lib/libcurses: newwin.c

 Log Message:
 __makenew: use calloc to get zeroed memory for window contents.

 PR lib/56767.


 To generate a diff of this commit:
 cvs rdiff -u -r1.64 -r1.65 src/lib/libcurses/newwin.c

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

State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Mon, 28 Mar 2022 19:54:56 +0000
State-Changed-Why:
Both cgram(6) and ncdu(1) work again, thanks for the fix.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.