From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#44349: 28.0.50; Assertion failure on macOS when resizing frame Date: Sun, 29 Nov 2020 17:16:23 +0000 Message-ID: <20201129171623.GH26836@breton.holly.idiocy.org> References: <83eelegxq6.fsf@gnu.org> <83a6w2gwxz.fsf@gnu.org> <20201127222429.GD26836@breton.holly.idiocy.org> <835z5por4y.fsf@gnu.org> <20201128220645.GF26836@breton.holly.idiocy.org> <835z5omc6s.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28963"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44349@debbugs.gnu.org, p.stephani2@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 29 18:17:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjQK6-0007IO-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Nov 2020 18:17:18 +0100 Original-Received: from localhost ([::1]:49624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjQK5-00011p-MS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Nov 2020 12:17:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjQJs-00011A-HW for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 12:17:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjQJq-0005Wt-IU for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 12:17:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjQJq-0003Fj-D6 for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 12:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Nov 2020 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44349 X-GNU-PR-Package: emacs Original-Received: via spool by 44349-submit@debbugs.gnu.org id=B44349.160667020912477 (code B ref 44349); Sun, 29 Nov 2020 17:17:02 +0000 Original-Received: (at 44349) by debbugs.gnu.org; 29 Nov 2020 17:16:49 +0000 Original-Received: from localhost ([127.0.0.1]:52411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjQJc-0003FB-Pi for submit@debbugs.gnu.org; Sun, 29 Nov 2020 12:16:49 -0500 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]:34556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjQJb-0003Er-6T for 44349@debbugs.gnu.org; Sun, 29 Nov 2020 12:16:47 -0500 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id 9B976D62; Sun, 29 Nov 2020 18:16:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1606670201; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=1621; bh=dLvoBxiulMlVsbBsMh+FxCVRtHjen5AMkEkcobkmjJA=; b=Jqusm3CHJvdRDCI5wK82o+aMtSqLaIf2xrNkzias/t2bmumyJWS0diSr0AfnqAGC 4joqf3ED+FAOP5AdcbRHdbzkTJmWwnP6Wd1V7BFCsO0WG8hZj6cas90PCFs4/YemAJX ErXD2n2HVhP4/vIvxjG+J7HXV90rP1Bza2N5UPDx7/YitwdTUZ09GovuZtBIapkj/Zs xhb1zIQpmZvvvQ1Yf5nxr9fLKqG/tGQBmcPzMSdaDCGgpLV2x3M0XmvkuOL9/GDZCbn qYKvIy/OIdw3Uzw4I0DW9kWV4+2H8ugEjSmfwpQZ2D06mVeT6MQF18dmNaL9tBQVk08 6A+60t+1Hw== Original-Received: by smtp.mailfence.com with ESMTPA ; Sun, 29 Nov 2020 18:16:38 +0100 (CET) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id ADB0A20269C9B9; Sun, 29 Nov 2020 17:16:23 +0000 (GMT) Mail-Followup-To: Alan Third , Eli Zaretskii , 44349@debbugs.gnu.org, p.stephani2@gmail.com Content-Disposition: inline In-Reply-To: <835z5omc6s.fsf@gnu.org> X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194571 Archived-At: On Sun, Nov 29, 2020 at 05:10:03PM +0200, Eli Zaretskii wrote: > > Date: Sat, 28 Nov 2020 22:06:45 +0000 > > From: Alan Third > > Cc: p.stephani2@gmail.com, 44349@debbugs.gnu.org > > > > > Thanks! Can we add tests for this? > > > > I was wondering that. How do we add tests for internal C functions? > > By calling Lisp functions which call them. But maybe it isn't > possible in this case. > > Wait, isn't the use case which caused this bug report a suitable test > for the change? It requires a frame to be resized with the mouse, we don't have a way of doing that from lisp. I can't see any way of using lisp functions to test doprnt, it's mostly used in formatting error messages and other small bits and pieces. > > > Silently ignoring parts of input sounds ... unusual, so I wonder what > > > would it take to avoid that. How did the old code avoid this problem? > > > > This situation can only be caused by calling doprnt with format_end > > set to some point inside a multibyte character (it's a pointer). > > Ah, okay. In that case, I think ignoring the invalid sequence is OK, > but let's document that in the function's commentary. I think, having thought about it more, I'd prefer to just pass through the malformed input. If we want to make sure that putting format_end in the middle of a multibyte character doesn't break anything I think we'd be better fixing doprnt_non_null_end to cut the string up neatly. format_end isn't currently used anywhere in Emacs, so I don't know if it's worth fixing, but I'll add a FIXME comment. -- Alan Third