unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 41520@debbugs.gnu.org, stefan@marxist.se
Subject: bug#41520: 28.0.50; Crash in character.h due to assertion error
Date: Mon, 25 May 2020 15:16:09 +0000	[thread overview]
Message-ID: <CAOqdjBcT3T+mmN=VPqHkcJOkrvz7saEWYzmOC73LXyvvdNHMMQ@mail.gmail.com> (raw)
In-Reply-To: <837dx0vysk.fsf@gnu.org>

On Mon, May 25, 2020 at 3:07 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Mon, 25 May 2020 14:30:55 +0000
> > Cc: stefan@marxist.se, 41520@debbugs.gnu.org
> >
> > I'm attaching a patch with a few more cases. I don't have a strong
> > preference for either FETCH_BYTE or FETCH_CHAR where both will do, but
> > we should be consistent.
>
> I'm okay with those additional changes, but let's install them on
> master, as they are a cleanup, not a bug.

Sure.

> > > That would require us to maintain both character and byte positions
> > > where we use these macros,
> >
> > For now, I'd like to introduce them in Emacs proper only where we have
> > pairs of variables anyway.
>
> Maybe a new macro that accepts a 'struct text_pos'?

Yes, a pos_t would look like a struct text_pos, at least in non-debug builds.

> But wouldn't it be strange to see a macro that accepts a struct, but
> only uses one member of that struct?

I don't think so. CHARPOS and BYTEPOS already exist, and that's
precisely what they do.

What is a little strange is that the ancient convention of not
returning struct types is still followed in much of Emacs.

> > > Moreover, I think we prefer having assertions in the debug
> > > builds rather then silent fixups (and in production eassume compiles
> > > into something that doesn't abort).
> >
> > I see no way to have assertions
>
> I mean we already have assertions: that's what eassume does in a debug
> build.

Yes, but we could do with some stricter checking, I think.





  reply	other threads:[~2020-05-25 15:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25  7:05 bug#41520: 28.0.50; Crash in character.h due to assertion error Stefan Kangas
2020-05-25  7:28 ` Pip Cet
2020-05-25  7:41   ` Pip Cet
2020-05-25 14:18   ` Eli Zaretskii
2020-05-25 14:30     ` Pip Cet
2020-05-25 15:07       ` Eli Zaretskii
2020-05-25 15:16         ` Pip Cet [this message]
2020-05-25 16:09           ` Eli Zaretskii
2020-05-25 17:54             ` Pip Cet
2020-05-25 19:30               ` Eli Zaretskii
2020-05-25 20:39                 ` Pip Cet
2020-05-26 16:17                   ` Eli Zaretskii
2020-09-27 14:36         ` Lars Ingebrigtsen
2020-09-27 15:15           ` Eli Zaretskii
2020-09-27 15:42             ` Lars Ingebrigtsen
2020-09-27 16:00               ` Eli Zaretskii

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='CAOqdjBcT3T+mmN=VPqHkcJOkrvz7saEWYzmOC73LXyvvdNHMMQ@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=41520@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /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).