GNU bug report logs - #874
Args out of range with new auto-composition implementation

Previous Next

Package: emacs;

Reported by: "Juanma Barranquero" <lekktu <at> gmail.com>

Date: Wed, 3 Sep 2008 16:30:03 UTC

Severity: normal

Found in version 23.0.60

Done: "Juanma Barranquero" <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 874 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: 874 <at> debbugs.gnu.org
Subject: Re: bug#874: Args out of range with new auto-composition implementation
Date: Thu, 4 Sep 2008 17:25:46 +0200
On Wed, Sep 3, 2008 at 18:21, Juanma Barranquero <lekktu <at> gmail.com> wrote:

> emacs -Q -l testbug.el
> C-h H
> M-: (goto-char 276) <RET>   ;; or move the cursor to any auto-composed char
> M-x testbug <RET>
>
>  => "Args out of range: 274, 274"

Curious. The out of range error is caused by this code in
textprop.c:validate_interval_range

      if (!(BUF_BEGV (b) <= XINT (*begin) && XINT (*begin) <= XINT (*end)
	    && XINT (*end) <= BUF_ZV (b)))
	  args_out_of_range (*begin, *end);

At that point,

  BUF_BEGV (b)  = 1
  BUF_ZV (b)    = 1
  XINT (*begin) = 274
  XINT (*end)   = 274

where *begin and *end point to the position in buffer "HELLO", but b
(and hence object, from which b is extracted) points to the just
created buffer "testbug":

(gdb) p object
$1 = 64949764
(gdb) xbuffer
$2 = (struct buffer *) 0x3df0e00
(unsigned char *) 0x3de6880 "testbug"

so it's no wonder it fails.




This bug report was last modified 16 years and 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.