NetBSD Problem Report #51518

From dholland@netbsd.org  Fri Sep 30 06:53:26 2016
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 626BF7A270
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 30 Sep 2016 06:53:26 +0000 (UTC)
Message-Id: <20160930065325.E2F3685ECC@mail.netbsd.org>
Date: Fri, 30 Sep 2016 06:53:25 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: inconsistent values of CPUSTATES in /usr/include
X-Send-Pr-Version: 3.95

>Number:         51518
>Category:       lib
>Synopsis:       inconsistent values of CPUSTATES in /usr/include
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 30 06:55:00 +0000 2016
>Last-Modified:  Fri Sep 01 10:20:01 +0000 2017
>Originator:     David A. Holland
>Release:        NetBSD 7.99.36 (20160905)
>Organization:
>Environment:
System: 
Architecture: x86_64
Machine: amd64
>Description:

   % grep CPUSTATES lib/librpcsvc/rstat.x sys/sys/sched.h 
   lib/librpcsvc/rstat.x:const CPUSTATES = 4;
   sys/sys/sched.h:#define CPUSTATES       5

(rstat.x ultimately produces /usr/include/rpcsvc/rstat.h)

This probably isn't good as it's used as an array size in both
interfaces.

>How-To-Repeat:

>Fix:

burn down sunrpc?

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51518 CVS commit: src/lib/libedit
Date: Fri, 1 Sep 2017 06:19:10 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Fri Sep  1 10:19:10 UTC 2017

 Modified Files:
 	src/lib/libedit: editline.3 hist.h histedit.h history.c readline.c
 	src/lib/libedit/readline: readline.h

 Log Message:
 PR/51517: Jay West: Tty settings not restored on exit
 PR/51518: Jay West: prompt is interleaved with client output

 Both these issues are caused by rl_restore_handler not DTRT; fix
 it so that it kills the internal libedit state completely. This is
 inefficient, but it works.

 Also fix:
 1. add append_history()/H_NSAVE_FP
 2. call the rl_startup_hook before printing the first prompt as documented.
    callint it from rl_initialize breaks python, because the callback ends
    up being invoked before the readline module is installed, and we end up
    dereferencing a NULL pointer.
 3. add el_resize_terminal.

 With those changes, s/lreadline/ledit/g in python works.


 To generate a diff of this commit:
 cvs rdiff -u -r1.96 -r1.97 src/lib/libedit/editline.3
 cvs rdiff -u -r1.22 -r1.23 src/lib/libedit/hist.h
 cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/histedit.h
 cvs rdiff -u -r1.57 -r1.58 src/lib/libedit/history.c
 cvs rdiff -u -r1.141 -r1.142 src/lib/libedit/readline.c
 cvs rdiff -u -r1.41 -r1.42 src/lib/libedit/readline/readline.h

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

NetBSD Home
NetBSD PR Database Search

(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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.