From: Chong Yidong <cyd@stupidchicken.com>
To: bug-gnu-emacs@gnu.org
Cc: Kenichi Handa <handa@m17n.org>
Subject: Re: Crash using text property 'composite on w32
Date: Tue, 12 Jun 2007 11:44:59 -0400 [thread overview]
Message-ID: <87bqfl5g90.fsf@stupidchicken.com> (raw)
In-Reply-To: f7ccd24b0706111707n6455fb3bs9fdd6eb790269ef7@mail.gmail.com
"Juanma Barranquero" <lekktu@gmail.com> writes:
> Program received signal SIGSEGV, Segmentation fault.
> 0x010c798a in run_composition_function (from=267, to=269, prop=520)
> at composite.c:456
> 456 func = COMPOSITION_MODIFICATION_FUNC (prop);
> (gdb) bt
> #0 0x010c798a in run_composition_function (from=267, to=269, prop=520)
> at composite.c:456
> #1 0x010c7d1c in update_compositions (from=269, to=271, check_mask=3)
> at composite.c:514
The trouble here is that the code expects the property `prop' obtained
from find_composition to be a valid composition, which is a cons. So
probably the way to fix this is to stick in a couple of
COMPOSITION_VALID_P checks into update_compositions, around
composite.c:514.
The strange thing, though, is that the elisp manual describes the
composition property as follows (documented by Handa on 2007-04-19):
`composition'
This text property is used to display a sequence of characters as a
single glyph composed from components. For instance, in Thai a
base consonant is composed with the following combining vowel as a
single glyph. The value should be a character or a sequence
(vector, list, or string) of integers.
* If it is a character, it means to display that character
instead of the text in the region.
* If it is a string, it means to display that string's contents
instead of the text in the region.
* If it is a vector or list, the elements are characters
interleaved with internal codes specifying how to compose the
following character with the previous one.
Is this a mistake? The assumption made in the Emacs code is that the
only valid form for a `composition' property is a cons cell. For
example, the definition of COMPOSITION_VALID_P in composite.h:96 is
#define COMPOSITION_VALID_P(start, end, prop) \
(CONSP (prop) \
&& .....
So it looks like the documentation needs to be fixed too.
prev parent reply other threads:[~2007-06-12 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 16:32 Crash using text property 'composite on w32 Lennart Borgman (gmail)
2007-06-11 23:49 ` Jason Rumney
2007-06-11 23:58 ` Lennart Borgman (gmail)
2007-06-12 0:04 ` Jason Rumney
2007-06-12 0:07 ` Juanma Barranquero
2007-06-12 0:30 ` Lennart Borgman (gmail)
2007-06-12 3:19 ` Eli Zaretskii
2007-06-12 10:28 ` Lennart Borgman (gmail)
2007-06-12 15:44 ` Chong Yidong [this message]
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=87bqfl5g90.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=handa@m17n.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).