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: Problem report #76 Date: Wed, 10 May 2006 18:20:39 -0700 Message-ID: <200605110120.k4B1KdgO011061@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 1147310807 22982 80.91.229.2 (11 May 2006 01:26:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 May 2006 01:26:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 11 03:26:46 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 1Fdzwu-0006Uh-OU for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 03:26:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdzwu-0003YV-1x for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 21:26:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdzwF-0003NR-81 for emacs-devel@gnu.org; Wed, 10 May 2006 21:25:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdzwE-0003ND-NR for emacs-devel@gnu.org; Wed, 10 May 2006 21:25:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdzwE-0003N2-Eb for emacs-devel@gnu.org; Wed, 10 May 2006 21:25:58 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fdzxd-0007YG-AI for emacs-devel@gnu.org; Wed, 10 May 2006 21:27:25 -0400 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.13.6/8.13.5) with ESMTP id k4B1KdgO011061 for ; Wed, 10 May 2006 18:20:39 -0700 (PDT) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 185 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@vino.ics.uci.edu 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:54214 Archived-At: CID: 76 Checker: FORWARD_NULL (help) File: base/src/emacs/src/xdisp.c Function: x_produce_glyphs Description: Variable "font_info" tracked as NULL was dereferenced. 20490 /* Draw the first glyph at the normal position. It may be 20491 shifted to right later if some other glyphs are drawn at 20492 the left. */ 20493 cmp->offsets[0] = 0; 20494 cmp->offsets[1] = boff; 20495 20496 /* Set cmp->offsets for the remaining glyphs. */ At conditional (13): "i < (cmp)->glyph_len" taking true path 20497 for (i = 1; i < cmp->glyph_len; i++) 20498 { 20499 int left, right, btm, top; At conditional (14): "(cmp)->method == 5" taking true path 20500 int ch = COMPOSITION_GLYPH (cmp, i); At conditional (15): "ch & 255 == ch" taking true path 20501 int face_id = FACE_FOR_CHAR (it->f, face, ch); 20502 At conditional (16): "face_id < (((it)->f)->face_cache)->used" taking true path 20503 face = FACE_FROM_ID (it->f, face_id); 20504 get_char_face_and_encoding (it->f, ch, face->id, 20505 &char2b, it->multibyte_p, 0); 20506 font = face->font; At conditional (17): "font == 0" taking false path 20507 if (font == NULL) 20508 { 20509 font = FRAME_FONT (it->f); 20510 boff = FRAME_BASELINE_OFFSET (it->f); Event assign_zero: Variable "font_info" assigned value 0. Also see events: [var_deref_op] 20511 font_info = NULL; 20512 } 20513 else 20514 { At conditional (18): "(face)->font_info_id >= 0" taking true path At conditional (19): "(face)->font_info_id < (((((it)->f)->output_data).x)->display_info)->font_table_size" taking false path 20515 font_info 20516 = FONT_INFO_FROM_ID (it->f, face->font_info_id); Event var_deref_op: Variable "font_info" tracked as NULL was dereferenced. Also see events: [assign_zero] 20517 boff = font_info->baseline_offset; 20518 if (font_info->vertical_centering) 20519 boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff; 20520 } 20521 At conditional (1): "font_info != 0" taking false path 20522 if (font_info 20523 && (pcm = rif->per_char_metric (font, &char2b, 20524 FONT_TYPE_FOR_MULTIBYTE (font, ch)))) 20525 { 20526 width = pcm->width; 20527 ascent = pcm->ascent; 20528 descent = pcm->descent; 20529 } 20530 else 20531 { 20532 width = FONT_WIDTH (font); 20533 ascent = 1; 20534 descent = 0; 20535 } 20536 At conditional (2): "(cmp)->method != 5" taking false path 20537 if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS) 20538 { 20539 /* Relative composition with or without 20540 alternate chars. */ 20541 left = (leftmost + rightmost - width) / 2; 20542 btm = - descent + boff; 20543 if (font_info && font_info->relative_compose 20544 && (! CHAR_TABLE_P (Vignore_relative_composition) 20545 || NILP (Faref (Vignore_relative_composition, 20546 make_number (ch))))) 20547 { 20548 20549 if (- descent >= font_info->relative_compose) 20550 /* One extra pixel between two glyphs. */ 20551 btm = highest + 1; 20552 else if (ascent <= 0) 20553 /* One extra pixel between two glyphs. */ 20554 btm = lowest - 1 - ascent - descent; 20555 } 20556 } 20557 else 20558 { 20559 /* A composition rule is specified by an integer 20560 value that encodes global and new reference 20561 points (GREF and NREF). GREF and NREF are 20562 specified by numbers as below: 20563 20564 0---1---2 -- ascent 20565 | | 20566 | | 20567 | | 20568 9--10--11 -- center 20569 | | 20570 ---3---4---5--- baseline 20571 | | 20572 6---7---8 -- descent 20573 */ 20574 int rule = COMPOSITION_RULE (cmp, i); 20575 int gref, nref, grefx, grefy, nrefx, nrefy; 20576 At conditional (3): "gref > 12" taking false path At conditional (4): "0" taking false path 20577 COMPOSITION_DECODE_RULE (rule, gref, nref); 20578 grefx = gref % 3, nrefx = nref % 3; 20579 grefy = gref / 3, nrefy = nref / 3; 20580 20581 left = (leftmost 20582 + grefx * (rightmost - leftmost) / 2 20583 - nrefx * width / 2); At conditional (5): "grefy == 0" taking true path At conditional (6): "nrefy == 0" taking false path At conditional (7): "nrefy == 1" taking false path At conditional (8): "nrefy == 2" taking false path 20584 btm = ((grefy == 0 ? highest 20585 : grefy == 1 ? 0 20586 : grefy == 2 ? lowest 20587 : (highest + lowest) / 2) 20588 - (nrefy == 0 ? ascent + descent 20589 : nrefy == 1 ? descent - boff 20590 : nrefy == 2 ? 0 20591 : (ascent + descent) / 2)); 20592 } 20593 20594 cmp->offsets[i * 2] = left; 20595 cmp->offsets[i * 2 + 1] = btm + descent; 20596 20597 /* Update the bounding box of the overall glyphs. */ 20598 right = left + width; 20599 top = btm + descent + ascent; At conditional (9): "left < leftmost" taking true path 20600 if (left < leftmost) 20601 leftmost = left; At conditional (10): "right > rightmost" taking true path 20602 if (right > rightmost) 20603 rightmost = right; At conditional (11): "top > highest" taking true path 20604 if (top > highest) 20605 highest = top; At conditional (12): "btm < lowest" taking true path 20606 if (btm < lowest) 20607 lowest = btm; 20608 } 20609 20610 /* If there are glyphs whose x-offsets are negative, 20611 shift all glyphs to the right and make all x-offsets 20612 non-negative. */