NetBSD Problem Report #51518

From  Fri Sep 30 06:53:26 2016
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 626BF7A270
	for <>; Fri, 30 Sep 2016 06:53:26 +0000 (UTC)
Message-Id: <>
Date: Fri, 30 Sep 2016 06:53:25 +0000 (UTC)
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)
Architecture: x86_64
Machine: amd64

   % 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



burn down sunrpc?

From: "Christos Zoulas" <>
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:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.