GNU bug report logs - #11077
24.0.94; avl-tree--enter-balance: (wrong-type-argument arrayp nil)

Previous Next

Package: emacs;

Reported by: Christopher Schmidt <christopher <at> ch.ristopher.com>

Date: Fri, 23 Mar 2012 20:00:02 UTC

Severity: normal

Found in version 24.0.94

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: 11077 <at> debbugs.gnu.org
Subject: bug#11077: 24.0.94; avl-tree--enter-balance: (wrong-type-argument arrayp nil)
Date: Tue, 27 Mar 2012 19:59:02 +0200
Christopher Schmidt <christopher <at> ch.ristopher.com> writes:

> Christopher Schmidt <christopher <at> ch.ristopher.com> writes:
>
>> I have to run the body of the outer loop multiple times or increase
>> the repeat count of the inner loop to trigger the error.  I am not
>> running out of virtual memory, though.  Adding `do (garbage-collect)'
>> to the outer loop does not help either.
>
> This seems to be a bug caused by inconsistencies in the tree generated
> by a specific dataset.  This recipe triggers the error right away:
>
> #+BEGIN_SRC emacs-lisp
> (require 'cl)
> (require 'avl-tree)
>
> (loop with *random-state* = (vector 'cl-random-state-tag -1 30 6988712785513)
>       repeat 1000
>       with tree = (avl-tree-create (lambda (a b) (< a b)))
>       do (avl-tree-enter tree (random* 100000)))
> #+END_SRC

BTW. this is a regression.  The code above works fine in Emacs 23.3.
Here's the commit that introduced the problem:

revno: 104392 [merge]
author: Toby Cubitt <toby-predictive <at> dr-qubit.org>
committer: Stefan Monnier <monnier <at> iro.umontreal.ca>
branch nick: trunk
timestamp: Fri 2011-05-27 20:03:26 -0300
message:
  * lisp/emacs-lisp/avl-tree.el: New avl-tree-stack datatype.  Add new
  traversal functions for avl-trees.  Consolidate rebalancing code.

        Christopher




This bug report was last modified 13 years and 56 days ago.

Previous Next


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