GNU bug report logs - #41520
28.0.50; Crash in character.h due to assertion error

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Mon, 25 May 2020 07:06:01 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 41520 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 41520 <at> debbugs.gnu.org, stefan <at> marxist.se
Subject: Re: bug#41520: 28.0.50; Crash in character.h due to assertion error
Date: Mon, 25 May 2020 15:16:09 +0000
On Mon, May 25, 2020 at 3:07 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Pip Cet <pipcet <at> gmail.com>
> > Date: Mon, 25 May 2020 14:30:55 +0000
> > Cc: stefan <at> marxist.se, 41520 <at> 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.




This bug report was last modified 4 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.