From: Dmitry Antipov <dmantipov@yandex.ru>
To: 19435@debbugs.gnu.org
Cc: Ivan Shmakov <ivan@siamics.net>
Subject: bug#19435: SIGSEGV in PSEUDOVECTOR_TYPEP when using find-file on a RTL filename
Date: Wed, 24 Dec 2014 11:36:42 +0300 [thread overview]
Message-ID: <549A7B1A.5070304@yandex.ru> (raw)
In-Reply-To: <87mw6dfr1r.fsf@violet.siamics.net>
On 12/24/2014 10:25 AM, Ivan Shmakov wrote:
> As of 36c43e95de5e (2014-12-18 16:44:11 +0000), Emacs segfaults
> when trying to use find-file on "\u062f\u0646\u06cc" (encoded as
> a ASCII-safe Emacs string literal here.)
>
> Strangely enough, $ emacs -Q handles that filename just fine.
>
> The backtrace is MIMEd.
Reproduced. This seems to be a redisplay glitch since composition_compute_stop_pos
makes an attempt to move CMP_IT beyond STRING's boundaries, as handled by the
following extra eassert:
diff --git a/src/composite.c b/src/composite.c
index 8982c90..fa60cc0 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1005,7 +1005,10 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
while (charpos < endpos)
{
if (STRINGP (string))
- FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos);
+ {
+ eassert (charpos < SCHARS (string) && bytepos < SBYTES (string));
+ FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos);
+ }
else
FETCH_CHAR_ADVANCE (c, charpos, bytepos);
if (c == '\n')
Dmitry
next prev parent reply other threads:[~2014-12-24 8:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 7:25 bug#19435: SIGSEGV in PSEUDOVECTOR_TYPEP when using find-file on a RTL filename Ivan Shmakov
2014-12-24 8:36 ` Dmitry Antipov [this message]
2014-12-25 15:41 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=549A7B1A.5070304@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=19435@debbugs.gnu.org \
--cc=ivan@siamics.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.