GNU bug report logs - #39207
28.0.50; crash when sending gnus message

Previous Next

Package: emacs;

Reported by: Gijs Hillenius <gijs <at> hillenius.net>

Date: Mon, 20 Jan 2020 16:29:02 UTC

Severity: normal

Found in version 28.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39207 <at> debbugs.gnu.org, gijs <at> hillenius.net
Subject: bug#39207: WITH dgb symbols Re: bug#39207: 28.0.50; crash when sending gnus message
Date: Wed, 22 Jan 2020 21:39:46 +0100
>>>>> On Wed, 22 Jan 2020 19:37:04 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    >> From: Robert Pluim <rpluim <at> gmail.com>
    >> Cc: gijs <at> hillenius.net,  39207 <at> debbugs.gnu.org
    >> Date: Wed, 22 Jan 2020 17:58:12 +0100
    >> 
    >> (gdb) pp BVAR(current_buffer,enable_multibyte_characters)
    >> t
    >> (gdb)
    >> (gdb) pp BVAR(buffer,enable_multibyte_characters)
    >> t
    >> 
    >> Thereʼs one stray \342 in there, but the rest looks like ASCII. The
    >> character gnus should be trying to insert is #x2713, which is
    >> represented as #xE2 #x9C #x93 (\342 \234 \223), so it looks like there
    >> are some bytes missing.

    Eli> Where's the gap start address? are you sure \342 is not inside the
    Eli> gap?

gpt and gpt_byte are both 439 and that \342 is at byte pos 435

    Eli> Does Gnus make the buffer unibyte and then multibyte again or
    Eli> something?  Or maybe it uses some trick to replace a character in a
    Eli> string, when it inserts the tickmark, and that trick doesn't work with
    Eli> non-ASCII characters?

Hmm:

(defun gnus-summary-update-mark (mark type)
  (let ((forward (cdr (assq type gnus-summary-mark-positions)))
	(inhibit-read-only t))
    (re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit)
    (when forward
      (when (looking-at "\r")
	(cl-incf forward))
      (when (<= (+ forward (point)) (point-max))
	;; Go to the right position on the line.
	(goto-char (+ forward (point)))
	;; Replace the old mark with the new mark.
        (let ((to-insert
               (subst-char-in-string
		(char-after) mark
		(buffer-substring (point) (1+ (point))))))
          (delete-region (point) (1+ (point)))
          (insert to-insert))

If in an emacs in *scratch* I do

(insert (subst-char-in-string (char-after) ?✓
    (buffer-substring-no-properties (point) (1+ (point)))))

that emacs displays several ^@ characters at the end of the buffer,
and then crashes the same way as with Gnus.

Perhaps Iʼm missing something, but isnʼt this just

(delete-region (point) (1+ (point)))
(insert mark)

(that seems to fix the gnus crash for me)

Robert




This bug report was last modified 5 years and 173 days ago.

Previous Next


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