Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2020 21:05:47 +0300
From:      Yuri Pankov <yuripv@yuripv.dev>
To:        Steve Wills <swills@FreeBSD.org>, Mark Millard <marklmi@yahoo.com>, "daichi@freebsd.org" <daichi@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, Hiroki Sato <hrs@FreeBSD.org>
Subject:   Re: svn commit: r352558 - head/usr.bin/top
Message-ID:  <f8c8e434-39d7-4c7b-d33d-ef8a6b196eb9@yuripv.dev>
In-Reply-To: <61107ecc-6f9b-a4db-7b1e-ec75f73939ee@FreeBSD.org>
References:  <1BDFB387-930D-4F4D-8729-A5850F1C15B9.ref@yahoo.com> <1BDFB387-930D-4F4D-8729-A5850F1C15B9@yahoo.com> <61107ecc-6f9b-a4db-7b1e-ec75f73939ee@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f8c8e434-39d7-4c7b-d33d-ef8a6b196eb9>