unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
Subject: Re: Problem report #53
Date: Wed, 10 May 2006 22:12:58 -0700	[thread overview]
Message-ID: <200605110512.k4B5CwWK011916@amrm2.ics.uci.edu> (raw)
In-Reply-To: <200604111548.k3BFm834015075@scanner2.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 11 Apr 2006 08:48:08 -0700")


Anybody familiar with this code? 

Is it right to assume that XINT (pos) is always >= BUF_BEGV (XBUFFER (buffer)) ?
If yes, then this problem report is FALSE.

  > CID: 53
  > Checker: UNINIT (help)
  > File: emacs/src/textprop.c
  > Function: text_property_stickiness
  > Description: Using uninitialized value "prev_pos" in call to function "Fget_text_property"
>
>
  > Event var_decl: Declared variable "prev_pos" without initializer
  > Also see events: [uninit_use_in_call]
>
  > 1730 	  Lisp_Object prev_pos, front_sticky;
  > 1731 	  int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
  > 1732 	
>
  > At conditional (1): "buffer == Qnil" taking true path
>
  > 1733 	  if (NILP (buffer))
  > 1734 	    XSETBUFFER (buffer, current_buffer);
  > 1735 	
>
  > At conditional (2): "pos >> 3 > ((0), (buffer & -8))->begv" taking false path
>
  > 1736 	  if (XINT (pos) > BUF_BEGV (XBUFFER (buffer)))
  > 1737 	    /* Consider previous character.  */
  > 1738 	    {
  > 1739 	      Lisp_Object rear_non_sticky;
  > 1740 	
  > 1741 	      prev_pos = make_number (XINT (pos) - 1);
  > 1742 	      rear_non_sticky = Fget_text_property (prev_pos, Qrear_nonsticky, buffer);
  > 1743 	
  > 1744 	      if (!NILP (CONSP (rear_non_sticky)
  > 1745 			 ? Fmemq (prop, rear_non_sticky)
  > 1746 			 : rear_non_sticky))
  > 1747 		/* PROP is rear-non-sticky.  */
  > 1748 		is_rear_sticky = 0;
  > 1749 	    }
  > 1750 	
  > 1751 	  /* Consider following character.  */
  > 1752 	  front_sticky = Fget_text_property (pos, Qfront_sticky, buffer);
  > 1753 	
>
  > At conditional (3): "front_sticky == Qt" taking true path
>
  > 1754 	  if (EQ (front_sticky, Qt)
  > 1755 	      || (CONSP (front_sticky)
  > 1756 		  && !NILP (Fmemq (prop, front_sticky))))
  > 1757 	    /* PROP is inherited from after.  */
  > 1758 	    is_front_sticky = 1;
  > 1759 	
  > 1760 	  /* Simple cases, where the properties are consistent.  */
>
  > At conditional (4): "is_rear_sticky != 0" taking true path
  > At conditional (5): "is_front_sticky == 0" taking false path
>
  > 1761 	  if (is_rear_sticky && !is_front_sticky)
  > 1762 	    return -1;
>
  > At conditional (6): "is_rear_sticky == 0" taking false path
>
  > 1763 	  else if (!is_rear_sticky && is_front_sticky)
  > 1764 	    return 1;
>
  > At conditional (7): "is_rear_sticky == 0" taking false path
>
  > 1765 	  else if (!is_rear_sticky && !is_front_sticky)
  > 1766 	    return 0;
  > 1767 	
  > 1768 	  /* The stickiness properties are inconsistent, so we have to
  > 1769 	     disambiguate.  Basically, rear-sticky wins, _except_ if the
  > 1770 	     property that would be inherited has a value of nil, in which case
  > 1771 	     front-sticky wins.  */
>
  > Event uninit_use_in_call: Using uninitialized value "prev_pos" in call to function "Fget_text_property" [model]
  > Also see events: [var_decl]
  > At conditional (8): "pos >> 3 == ((0), (buffer & -8))->begv" taking false path
>
  > 1772 	  if (XINT (pos) == BUF_BEGV (XBUFFER (buffer))
  > 1773 	      || NILP (Fget_text_property (prev_pos, prop, buffer)))
  > 1774 	    return 1;
  > 1775 	  else
  > 1776 	    return -1;

  reply	other threads:[~2006-05-11  5:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11 15:48 Problem report #53 Dan Nicolaescu
2006-05-11  5:12 ` Dan Nicolaescu [this message]
2006-05-14 23:30   ` Problem report #53 -- real problem Richard Stallman
2006-05-22  2:39     ` Richard Stallman
2006-05-22  2:48       ` Miles Bader

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=200605110512.k4B5CwWK011916@amrm2.ics.uci.edu \
    --to=dann@ics.uci.edu \
    /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).