From owner-freebsd-current@freebsd.org Fri Jul 10 18:05:54 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECC3936FAA0 for ; Fri, 10 Jul 2020 18:05:54 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3LZ846HYz3S9p; Fri, 10 Jul 2020 18:05:52 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id 7FF151578; Fri, 10 Jul 2020 14:05:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 10 Jul 2020 14:05:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=S MW7rIytTWl3z4Hn6mKfEyKlb2sPVcmGEmYBsb91QT0=; b=HbjB8nSbctZuuDv5L 4cAHXU7iuDCCoiRRet05UwsIXfMiC09gYFJicyGOIibZhxdbhoytW7sR4k1QGXvS QeOSqYH7CanKvZuT7r0C6s9PXDg2PH38H3malT2uOo5wOyMG9JDq8VzC80i/Lek8 yvqA+2Hx0Iu506LvHAdbraexslAXDgJYoxkDjH33vIWj2/wx+2PNJG2yQcD1t3QH XhP107pvskVEe73zcUJyr0TJKd4VWb0+XY+ZWAaDdcvOuPTVF2/+3EXSY2ln5Ork zNc0KjTlOV42MIV48FUkcDm6gOPsxr7kYBWkT4IIhqtH7z3TfiqdQVT9/UB7tlX2 FmzwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=SMW7rIytTWl3z4Hn6mKfEyKlb2sPVcmGEmYBsb91Q T0=; b=GScOEdy2Qne8ad60zJiQTApOW+ze+6SCvT5SAdrf/09WklzxfRGL9EFnf KqNdby6qROQgJyPr8EenSr5Rr0jPSbtxq8AOW02Oet+wGaWJrm3LMCrsz9S/TRF0 lrFywXOQCKUFpbKxVn9jC5P1hHcz8RvQf4hnhugSgk++YwcWvimuCEikwoNAz/NI 4muNna8IVc4H1z7xzzp9heUzXKhlUlZrCCIgX7kuRx4aJuyhUMCm/PBEksQ6XG18 qNj1N+1EMHGLflynEiNfXu15f3lLFdbnlGe2DcxIIFsqYmWEf2go9ABmF7cOtLjI ODk5kfh1LdU2PPHp4dh7OuqJcvyiQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvddugdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihuhhrihhpvheshihurhhiphhvrdguvghvqeenucggtffrrghtth gvrhhnpeduheeiudduffeiieeludegudejheetueetfeduleeihfetteejhffghefguefg leenucffohhmrghinhepfhhrvggvsghsugdrohhrghdpihhmghhurhdrtghomhenucfkph epledurddvgedtrdduvdegrddufeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhephihurhhiphhvseihuhhrihhpvhdruggvvh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 81EEB306005F; Fri, 10 Jul 2020 14:05:48 -0400 (EDT) Subject: Re: svn commit: r352558 - head/usr.bin/top To: Steve Wills , Mark Millard , "daichi@freebsd.org" , FreeBSD Current , Hiroki Sato References: <1BDFB387-930D-4F4D-8729-A5850F1C15B9.ref@yahoo.com> <1BDFB387-930D-4F4D-8729-A5850F1C15B9@yahoo.com> <61107ecc-6f9b-a4db-7b1e-ec75f73939ee@FreeBSD.org> From: Yuri Pankov Message-ID: Date: Fri, 10 Jul 2020 21:05:47 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <61107ecc-6f9b-a4db-7b1e-ec75f73939ee@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4B3LZ846HYz3S9p X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=HbjB8nSb; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=GScOEdy2; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 64.147.123.18 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [-3.17 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[yuripv.dev:s=fm1,messagingengine.com:s=fm3]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.18]; NEURAL_HAM_LONG(-1.01)[-1.012]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; NEURAL_HAM_MEDIUM(-0.99)[-0.988]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-0.57)[-0.567]; FREEMAIL_TO(0.00)[FreeBSD.org,yahoo.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.18:from] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 18:05:55 -0000 Steve Wills wrote: > On 11/28/19 4:08 PM, Mark Millard via svn-src-head wrote: >>> Author: daichi >>> Date: Fri Sep 20 17:37:23 2019 >>> New Revision: 352558 >>> URL: >>> https://svnweb.freebsd.org/changeset/base/352558 >>> >>> >>> Log: >>>    top(1): support multibyte characters in command names (ARGV array) >>>    depending on locale. >>>     - add setlocale() >>>     - remove printable() function >>>     - add VIS_OCTAL and VIS_SAFE to the flag of strvisx() to display >>>       non-printable characters that do not use C-style backslash >>> sequences >>>       in three digit octal sequence, or remove it >>>    This change allows multibyte characters to be displayed according to >>>    locale. If it is recognized as a non-display character according >>> to the >>>    locale, it is displayed in three digit octal sequence. >>> >> >> Initially picking on tab characters as an example of what is >> probably a somewhat broader issue . . . >> >> Ever since this change, characters like tabs that do not fit >> in the next character cell when output, but for which they >> are !isprintable(...), now mess up the top display. Again >> using tab as an example: line wrapping from the text having >> been shifted over by more than one character cell. top does >> not track the line wrapping result in how it decides what >> to output for the following display updates. >> > > Apologies for the way late reply here, but I just now bothered tracking > this down. This commit seems to be the cause of some corruption I'm > seeing in long running top(1) as well. As Mark mentions, if I use "hh" > it clears up. Should I open a bugzilla bug? I can share screenshots of > the corruption, such as: > > https://i.imgur.com/Xqlwf9h.png > https://i.imgur.com/Jv0d5NU.png Does removing VIS_SAFE fixes the issue for you? As for original Mark's report (which I missed), removing isprintable() doesn't look wrong as vis(3) should take of its functionality (and in multibyte-aware way). Also, is there an easy way to reproduce this?