unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44349@debbugs.gnu.org, p.stephani2@gmail.com
Subject: bug#44349: 28.0.50; Assertion failure on macOS when resizing frame
Date: Sun, 29 Nov 2020 17:16:23 +0000	[thread overview]
Message-ID: <20201129171623.GH26836@breton.holly.idiocy.org> (raw)
In-Reply-To: <835z5omc6s.fsf@gnu.org>

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 <alan@idiocy.org>
> > 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





  reply	other threads:[~2020-11-29 17:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 15:51 bug#44349: 28.0.50; Assertion failure on macOS when resizing frame Philipp
2020-10-31 15:57 ` Philipp Stephani
2020-10-31 16:03   ` Philipp Stephani
2020-10-31 16:35   ` Eli Zaretskii
2020-10-31 16:43     ` Philipp Stephani
2020-10-31 16:52       ` Eli Zaretskii
2020-11-27 22:24         ` Alan Third
2020-11-28  7:51           ` Eli Zaretskii
2020-11-28 22:06             ` Alan Third
2020-11-29 10:27               ` Lars Ingebrigtsen
2020-11-29 15:10               ` Eli Zaretskii
2020-11-29 17:16                 ` Alan Third [this message]
2020-11-29 17:23                   ` Eli Zaretskii
2020-11-29 17:43                     ` Alan Third
2020-11-01  0:55   ` Alan Third
2020-11-01  0:58     ` Alan Third
2020-11-01  1:00     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201129171623.GH26836@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=44349@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).