GNU bug report logs - #77233
31.0.50; crash if message starts with a space and then without it

Previous Next

Package: emacs;

Reported by: Daniel Clemente <n142857 <at> gmail.com>

Date: Mon, 24 Mar 2025 09:44:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pip Cet <pipcet <at> protonmail.com>,
 Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: n142857 <at> gmail.com, 77233 <at> debbugs.gnu.org
Subject: Re: bug#77233: 31.0.50;
 crash if message starts with a space and then without it
Date: Mon, 24 Mar 2025 20:20:34 +0200
> Date: Mon, 24 Mar 2025 14:14:11 +0000
> From: Pip Cet <pipcet <at> protonmail.com>
> Cc: Daniel Clemente <n142857 <at> gmail.com>, 77233 <at> debbugs.gnu.org
> 
> "Eli Zaretskii" <eliz <at> gnu.org> writes:
> 
> >> #2  0x00005555556730a9 in cmcheckmagic (tty=0x555555a983a0) at cm.c:122
> >> 122        emacs_abort ();
> >> (gdb) list
> >> 117      if (frame_size_change_delayed (XFRAME (tty->top_frame)))
> >> 118        return;
> >> 119      if (curX (tty) == FrameCols (tty))
> >> 120        {
> >> 121          if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
> >> 122        emacs_abort ();
> >> 123          if (tty->termscript)
> >> 124        putc ('\r', tty->termscript);
> >> 125          putc ('\r', tty->output);
> >> 126          if (tty->termscript)
> >> (gdb) p curY(tty)
> >> $1 = 60
> >> (gdb) p FrameRows(tty)-1
> >> $2 = 60
> >> (gdb) p FrameCols(tty)
> >> $3 = 100
> >> (gdb)
> >
> > What is the value of curX(tty) ?  And if (as I'd expect) it is 100,
> > then do you have any idea how come it became 100 for a 2-character
> > message?
> 
> It is equal to FrameCols (tty), as established in line 119 (this
> requires a breakpoint in emacs_abort rather than terminate_due_to_signal).
> 
> > Can anyone else reproduce this?
> 
> I can, on GNU/Linux with no special options and in an xterm.

And you can explain how come curX(tty) got such a large value?

> Reverting 6fb68f4310d808827b83da053fbc112b316b7757 avoids the crash.

Adding Gerd.




This bug report was last modified 52 days ago.

Previous Next


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