From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Problem report #17 FALSE Date: Thu, 11 May 2006 16:41:26 +0900 Message-ID: References: <200604101850.k3AIo9lj005323@scanner2.ics.uci.edu> <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1147333464 17706 80.91.229.2 (11 May 2006 07:44:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 May 2006 07:44:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 11 09:44:21 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fe5qF-00064o-9I for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 09:44:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fe5oh-0000Lc-BJ for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 03:42:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fe5oS-0000LX-QQ for emacs-devel@gnu.org; Thu, 11 May 2006 03:42:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fe5oQ-0000L2-T4 for emacs-devel@gnu.org; Thu, 11 May 2006 03:42:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fe5oQ-0000Kz-D7 for emacs-devel@gnu.org; Thu, 11 May 2006 03:42:18 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fe5pn-0003yI-SM for emacs-devel@gnu.org; Thu, 11 May 2006 03:43:44 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by mx20.gnu.org with esmtp (Exim 4.52) id 1Fe5oK-0004bf-4U for emacs-devel@gnu.org; Thu, 11 May 2006 03:42:12 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4B7g8lR032404; Thu, 11 May 2006 16:42:08 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4B7g8WE013979; Thu, 11 May 2006 16:42:08 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Fe5na-00062F-00; Thu, 11 May 2006 16:41:26 +0900 Original-To: Dan Nicolaescu In-reply-to: <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu> (message from Dan Nicolaescu on Wed, 10 May 2006 22:10:10 -0700) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54247 Archived-At: In article <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu>, Dan Nicolaescu 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