From owner-freebsd-stable@freebsd.org Mon Dec 21 23:35:09 2020 Return-Path: Delivered-To: freebsd-stable@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 5C0ED4C6CC1 for ; Mon, 21 Dec 2020 23:35:09 +0000 (UTC) (envelope-from naddy@mips.inka.de) Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0G6N30yyz4fhR for ; Mon, 21 Dec 2020 23:35:07 +0000 (UTC) (envelope-from naddy@mips.inka.de) Received: from mips.inka.de (naddy@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1krUhm-00286c-Pc; Tue, 22 Dec 2020 00:35:06 +0100 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.16.1/8.16.1) with ESMTP id 0BLNUf0b021377 for ; Tue, 22 Dec 2020 00:30:41 +0100 (CET) (envelope-from naddy@lorvorc.mips.inka.de) Received: (from naddy@localhost) by lorvorc.mips.inka.de (8.16.1/8.16.1/Submit) id 0BLNUfNa021376 for freebsd-stable@freebsd.org; Tue, 22 Dec 2020 00:30:41 +0100 (CET) (envelope-from naddy) Date: Tue, 22 Dec 2020 00:30:41 +0100 From: Christian Weisgerber To: freebsd-stable@freebsd.org Subject: 12.2-STABLE: Something has broken the bash prompt Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4D0G6N30yyz4fhR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of naddy@mips.inka.de has no SPF policy when checking 2a04:c9c7:0:1073:217:a4ff:fe3b:e77c) smtp.mailfrom=naddy@mips.inka.de X-Spamd-Result: default: False [-2.10 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a04:c9c7:0:1073:217:a4ff:fe3b:e77c:from]; FREEFALL_USER(0.00)[naddy]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2a04:c9c7:0:1073:217:a4ff:fe3b:e77c:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[inka.de]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:202113, ipnet:2a04:c9c7::/32, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2020 23:35:09 -0000 I updated my 12.2-STABLE system from circa December 10 to the last stable/12 SVN commit and now my bash prompt is broken. I use a prompt with properly delineated non-printing characters: PS1="\[$(tput so)\]\u@\h\[$(tput se)\][\w] " Suddenly bash is very confused about the size of the prompt. To reproduce the problem, set PS1 as above, type a few characters, hit ^A to go to the beginning of the line, type some more, see the mess. A prompt without non-printing characters is perfectly fine. The problem is evident with LC_CTYPE=C.UTF-8, but LC_CTYPE=C is fine. Yes, there have been recent updates to the bash port. But I checked several versions, and 5.0.18, 5.1, and 5.1.4 are equally affected. And I was already running 5.1 before the problem appeared after I updated base. So I have reason to suspect that the breakage originates in base. I've looked over the stable/12 commits starting December 10 and I am very suspicious of yuripv's locale changes, in particular "update wcwidth data from utf8proc" looks like a potential culprit. Any insights? -- Christian "naddy" Weisgerber naddy@mips.inka.de