From: "Stuart D. Herring" <herring@lanl.gov>
Subject: Re: Problem report #16
Date: Wed, 12 Apr 2006 11:23:36 -0700 (PDT) [thread overview]
Message-ID: <41269.128.165.123.132.1144866216.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <200604121741.k3CHfRrO029529@amrm2.ics.uci.edu>
There's actually several possible problems here.
> > At conditional (1): "face != 0" taking false path
> >
> > 667 if (face)
> > 668 id = face->fontset;
This is a red herring -- face is reassigned later.
> > At conditional (2): "id < 0" taking true path
> >
> > 669 if (id < 0)
> > 670 fontset = Qnil;
> > 671 else
> > 672 fontset = FONTSET_FROM_ID (id);
Here's one thing I don't like: FONTSET_FROM_ID doesn't do any safety
checks on id. Can we trust this function to always get reasonable id
values?
> > 682 int face_id = XINT (elt);
> > 684 xassert (face_id == face->id);
Dan wrote (although not here in his message):
> This problem could happen if fs_load_font was called with face=NULL
> and id>0. Can that happen?
Here's where Dan's point is relevant: if face==NULL and id>0, then it
seems quite possible for this line to be reached...
> > 685 face = FACE_FROM_ID (f, face_id);
...just before assigning face, so it'd still be NULL. But there's more:
FACE_FROM_ID can fail and return NULL:
> > Event var_deref_op: Variable "face" tracked as NULL was dereferenced.
> > Also see events: [var_compare_op]
> >
> > 686 return (*get_font_info_func) (f, face->font_info_id);
So this part is dangerous if and only if face_id, derived from the
fontset, can be messed up. Nothing to do with face's value at entry to
the function. Someone who understands fontsets/font loading, comment?
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
next prev parent reply other threads:[~2006-04-12 18:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-11 15:48 Problem report #16 Dan Nicolaescu
2006-04-11 17:06 ` Stuart D. Herring
2006-04-12 17:41 ` Dan Nicolaescu
2006-04-12 18:23 ` Stuart D. Herring [this message]
2006-04-13 11:21 ` Kenichi Handa
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=41269.128.165.123.132.1144866216.squirrel@webmail.lanl.gov \
--to=herring@lanl.gov \
/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).