From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Problem report #17 Date: Wed, 10 May 2006 22:10:10 -0700 Message-ID: <200605110510.k4B5AAF1011901@amrm2.ics.uci.edu> References: <200604101850.k3AIo9lj005323@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147324247 26852 80.91.229.2 (11 May 2006 05:10:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 May 2006 05:10:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 11 07:10:45 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 1Fe3RX-0007yx-P7 for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 07:10:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fe3RX-0004VH-6G for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 01:10:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fe3RF-0004Us-Qo for emacs-devel@gnu.org; Thu, 11 May 2006 01:10:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fe3RE-0004Tq-2d for emacs-devel@gnu.org; Thu, 11 May 2006 01:10:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fe3RD-0004Tc-QI for emacs-devel@gnu.org; Thu, 11 May 2006 01:10:11 -0400 Original-Received: from [128.195.11.178] (helo=amrm2.ics.uci.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fe3Se-0007EB-UO for emacs-devel@gnu.org; Thu, 11 May 2006 01:11:41 -0400 Original-Received: from amrm2.ics.uci.edu (amrm2.ics.uci.edu [127.0.0.1]) by amrm2.ics.uci.edu (8.13.6/8.13.6) with ESMTP id k4B5AAdk011902 for ; Wed, 10 May 2006 22:10:10 -0700 Original-Received: (from dann@localhost) by amrm2.ics.uci.edu (8.13.6/8.13.6/Submit) id k4B5AAF1011901; Wed, 10 May 2006 22:10:10 -0700 Original-To: emacs-devel@gnu.org In-Reply-To: <200604101850.k3AIo9lj005323@scanner2.ics.uci.edu> (Dan Nicolaescu's message of "Mon, 10 Apr 2006 11:50:09 -0700") Original-Lines: 77 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:54241 Archived-At: 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. 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