GNU bug report logs - #3499
23.0.94; Assuming strsignal unibyte is wrong and leads to Emacs crashes

Previous Next

Package: emacs;

Reported by: Dmitry Dzhus <dima <at> sphinx.net.ru>

Date: Mon, 8 Jun 2009 17:10:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3499 in the body.
You can then email your comments to 3499 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3499; Package emacs. (Mon, 08 Jun 2009 17:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Dzhus <dima <at> sphinx.net.ru>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 08 Jun 2009 17:10:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dmitry Dzhus <dima <at> sphinx.net.ru>
To: emacs-pretest-bug <at> gnu.org
Cc: dima <at> sphinx.net.ru
Subject: 23.0.94; Assuming strsignal unibyte is wrong and leads to Emacs crashes
Date: Mon, 08 Jun 2009 21:02:36 +0400
[Message part 1 (text/plain, inline)]
The `strsignal(SIGNUM)' function from libc returns a pointer to a string
containing a message describing the signal SIGNUM.

Emacs `status_message' function from `src/process.c' attempts to
downcase the initial character of this string to print it in the echo
area:

    signame = strsignal (code);
    string = build_string (signame);
    SSET (string, 0, DOWNCASE (SREF (string, 0)));

As it has already been discussed in bug #778, using SSET/SREF is
incorrect when `string' is multibyte, which is the case for certain
locales like ru_RU.UTF-8. A patch similar to one proposed by Kenichi
Handa for bug #778 fixes this problem, too. The patch is attached.

[process-status-message-fix-multibyte.diff (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
To reproduce the crash caused by this problem, it's sufficient to call
`recompile' when the compilation buffer has running process inside
(which sometimes occurs when compiling TeX documents, for example). I've
attached the GDB backtrace; the top of the stack gave me the hint that
this problem is nearly the same as in bug #778.

[gdb-backtrace (application/octet-stream, attachment)]
[Message part 5 (text/plain, inline)]
The rest of this message contains information about my Emacs
installation.

In GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.14.7) of
 2009-05-29 on blizzard
 
Windowing system distributor `The X.Org Foundation', version
11.0.10503000

configured using `configure '--prefix=/usr' '--host=i686-pc-linux-gnu'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib'
'--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23'
'--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif'
'--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm'
'--with-xft' '--without-libotf' '--without-m17n-flt'
'--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos'
'--without-kerberos5' '--with-gpm' '--with-dbus'
'--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu'
'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=native -pipe'
'LDFLAGS=-Wl,-O1''

Important settings:
  value of $LC_ALL: 
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: C
  value of $LC_TIME: nil
  value of $LANG: ru_RU.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t
-- 
Happy Hacking.

http://sphinx.net.ru

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Tue, 09 Jun 2009 18:35:05 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Dzhus <dima <at> sphinx.net.ru>:
bug acknowledged by developer. (Tue, 09 Jun 2009 18:35:05 GMT) Full text and rfc822 format available.

Message #10 received at 3499-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Dmitry Dzhus <dima <at> sphinx.net.ru>
Cc: 3499-done <at> debbugs.gnu.org
Subject: Re: 23.0.94; Assuming strsignal unibyte is wrong and leads to Emacs crashes
Date: Tue, 09 Jun 2009 14:28:12 -0400
> As it has already been discussed in bug #778, using SSET/SREF is
> incorrect when `string' is multibyte, which is the case for certain
> locales like ru_RU.UTF-8. A patch similar to one proposed by Kenichi
> Handa for bug #778 fixes this problem, too. The patch is attached.

Thanks.  This patch looks safe and correct; since it's essentially an
extension of the Bug#778 fix, I've checked it into CVS.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Wed, 08 Jul 2009 14:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 350 days ago.

Previous Next


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