From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Problem report #17 FALSE
Date: Thu, 11 May 2006 16:41:26 +0900 [thread overview]
Message-ID: <E1Fe5na-00062F-00@etlken> (raw)
In-Reply-To: <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu> (message from Dan Nicolaescu on Wed, 10 May 2006 22:10:10 -0700)
In article <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:
> This has changed a bit in the latest report, maybe it rings a bell to
> someone now...
> Checker: FORWARD_NULL (help)
> File: base/src/emacs/src/xfaces.c
> Function: best_matching_font
> Description: Variable "best" tracked as NULL was passed to a function
> that dereferences it.
I see no bug here. It is assured thta nfonts > 0 when we
reach the following code. If there's a non-scalable font,
best != NULL. If there's no non-scalable font, there's a
scalable font. So, best is set to non-NULL at line 6682.
---
Kenichi Handa
handa@m17n.org
> Event var_compare_op: Added "best" due to comparison "best != 0"
> Also see events: [var_deref_op][var_deref_model]
> At conditional (1): "best != 0" taking false path
> 6668 if (best && best->numeric[XLFD_POINT_SIZE] == pt)
> 6669 non_scalable_has_exact_height_p = 1;
> 6670 else
> 6671 non_scalable_has_exact_height_p = 0;
> 6672
> At conditional (2): "i < nfonts" taking false path
> 6673 for (i = 0; i < nfonts; ++i)
> 6674 if (font_scalable_p (fonts + i))
> 6675 {
> 6676 if (best == NULL
> 6677 || better_font_p (specified, fonts + i, best, 0, 0)
> 6678 || (!non_scalable_has_exact_height_p
> 6679 && !better_font_p (specified, best, fonts + i, 0, 0)))
> 6680 {
> 6681 non_scalable_has_exact_height_p = 1;
> 6682 best = fonts + i;
> 6683 }
> 6684 }
> 6685
> At conditional (3): "needs_overstrike != 0" taking true path
> 6686 if (needs_overstrike)
> 6687 {
> 6688 enum xlfd_weight want_weight = specified[XLFD_WEIGHT];
> Event var_deref_op: Variable "best" tracked as NULL was dereferenced.
> Also see events: [var_compare_op][var_deref_model]
> 6689 enum xlfd_weight got_weight = best->numeric[XLFD_WEIGHT];
> 6690
> 6691 if (want_weight > XLFD_WEIGHT_MEDIUM && want_weight > got_weight)
> 6692 {
> 6693 /* We want a bold font, but didn't get one; try to use
> 6694 overstriking instead to simulate bold-face. However,
> 6695 don't overstrike an already-bold fontn unless the
> 6696 desired weight grossly exceeds the available weight. */
> 6697 if (got_weight > XLFD_WEIGHT_MEDIUM)
> 6698 *needs_overstrike = (got_weight - want_weight) > 2;
> 6699 else
> 6700 *needs_overstrike = 1;
> 6701 }
> 6702 }
> 6703 }
> 6704
> Event var_deref_model: Variable "best" tracked as NULL was passed to a function that dereferences it. [model]
> Also see events: [var_compare_op][var_deref_op]
> 6705 if (font_scalable_p (best))
> 6706 font_name = build_scalable_font_name (f, best, pt);
> 6707 else
> 6708 font_name = build_font_name (best);
> 6709
> 6710 /* Free font_name structures. */
> 6711 free_font_names (fonts, nfonts);
> 6712
> 6713 return font_name;
> 6714 }
> 6715
> 6716
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
o
prev parent reply other threads:[~2006-05-11 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 18:50 Problem report #17 Dan Nicolaescu
2006-05-11 5:10 ` Dan Nicolaescu
2006-05-11 7:41 ` Kenichi Handa [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=E1Fe5na-00062F-00@etlken \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.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).