unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: dmantipov@yandex.ru, maden.ldm@gmail.com, 18610@debbugs.gnu.org
Subject: bug#18610: 24.4.50; Specific file causing emacs to segfault upon opening
Date: Fri, 03 Oct 2014 19:35:35 +0300	[thread overview]
Message-ID: <8338b5i014.fsf@gnu.org> (raw)
In-Reply-To: <87a95d9m4z.fsf@igel.home>

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: handa@gnu.org,  dmantipov@yandex.ru,  maden.ldm@gmail.com,  18610@debbugs.gnu.org
> Date: Fri, 03 Oct 2014 18:02:52 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Andreas Schwab <schwab@linux-m68k.org>
> >> Cc: Kenichi Handa <handa@gnu.org>,  dmantipov@yandex.ru,  maden.ldm@gmail.com,  18610@debbugs.gnu.org
> >> Date: Fri, 03 Oct 2014 17:16:27 +0200
> >> 
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >> 
> >> > Btw, there's one more issue that bothers me.  In ONE_MORE_BYTE we have
> >> > this:
> >> >
> >> >     c = *src++;						\
> >> >     if (multibytep && (c & 0x80))			\
> >> >       {							\
> >> > 	if ((c & 0xFE) == 0xC0)				\
> >> > 	  c = ((c & 1) << 6) | *src++;			\
> >> > 	else						\
> >> > 	  {						\
> >> > 	    src--;					\
> >> > 	    c = - string_char (src, &src, NULL);	\
> >> > 	    record_conversion_result			\
> >> > 	      (coding, CODING_RESULT_INVALID_SRC);	\
> >> > 	  }						\
> >> >       }							\
> >> >
> >> > If 'src' is a signed type
> >> 
> >> It never is.
> >
> > You are right.  But c nevertheless does get assigned a negative value
> > when the byte at src is beyond 127, at least according to what GDB
> > shows me.
> 
> Exactly here:
> 	    c = - string_char (src, &src, NULL);

No, I meant here:

     c = *src++;						\





  reply	other threads:[~2014-10-03 16:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 14:50 bug#18610: 24.4.50; Specific file causing emacs to segfault upon opening maden.ldm
2014-10-02 15:40 ` Nicolas Richard
2014-10-03  8:14   ` Eli Zaretskii
2014-10-03 11:22     ` Dmitry Antipov
2014-10-03 12:20       ` Eli Zaretskii
2014-10-03 12:39         ` Eli Zaretskii
2014-10-03 15:16           ` Andreas Schwab
2014-10-03 15:32             ` Eli Zaretskii
2014-10-03 16:02               ` Andreas Schwab
2014-10-03 16:35                 ` Eli Zaretskii [this message]
2014-10-03 16:40                   ` Andreas Schwab
2014-10-03 16:57                     ` Eli Zaretskii
2014-10-05  8:59         ` K. Handa
2014-10-05 16:09           ` Eli Zaretskii
2014-10-06 14:00             ` K. Handa
2014-10-06 15:20               ` Eli Zaretskii
2014-10-07 12:34                 ` K. Handa
2014-10-07 13:20                   ` Ivan Shmakov
2014-10-07 14:33                     ` Eli Zaretskii
2014-10-07 15:10                       ` Ivan Shmakov
2014-10-07 15:19                         ` Eli Zaretskii
2014-10-08  7:33                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8338b5i014.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18610@debbugs.gnu.org \
    --cc=dmantipov@yandex.ru \
    --cc=maden.ldm@gmail.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).