bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41520: 28.0.50; Crash in character.h due to assertion error


From: Eli Zaretskii
Subject: bug#41520: 28.0.50; Crash in character.h due to assertion error
Date: Mon, 25 May 2020 19:09:25 +0300

> From: Pip Cet <pipcet@gmail.com>
> Date: Mon, 25 May 2020 15:16:09 +0000
> Cc: stefan@marxist.se, 41520@debbugs.gnu.org
> 
> > 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.

It's more expensive.  That's what I meant when I said "strange": why
would we fill 2 fields of a struct, but use only one?

> > 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.

It cannot catch the cases where we put a character position into the
byte position slot.  That's the general problem with using simple
scalars.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]