From: Brant Cheikes
Subject: bug found in Franz Allegro CLPC 1.0
Date: 
Message-ID: <2imc8p$1f3@linus.mitre.org>
Just for the information of any Allegro CL\PC users out there, I have
discovered a bug in the lisp interpreter.  I reported it today to
Franz, Inc., and they have confirmed it as a bona fide bug.  I am
hoping for a fix in the near future.

In the meantime, here's a description of the bug, and a workaround:

THE BUG

	The code	(not (null (member 'foo '(foo bar baz))))
	returns		(foo bar baz)
	when it should return T

The weirdness is in the interaction between NOT and NULL when (I
think) the argument to NULL is the result of a regular function call:

	(not (null '(a b c))) => T                  ; as expected
	(not (null (list 'a 'b 'c))) => (a b c)     ; bitten by the bug

Note:
	(null (list 'a 'b 'c)) => NIL               ; expected result


WHEN DOES THIS BUG BITE?

You will have a problem any time you try to compare the results of two
different calls to (not (null..., e.g.,

	(if (eq (not (null (list 'a 'b 'c)))
		(not (null (list 'd 'e 'f))))
	  'not-bitten
	 'bitten)

The above form, when evaluated, SHOULD return NOT-BITTEN.
Unfortunately, in Allegro CL\PC 1.0, it returns BITTEN.

Admittedly, the reasons for wanting to make such a comparison are
obscure.  Thus you are unlikely to be BITTEN.  Nevertheless, it would
be a wise idea to check your code carefully for such calls, just to be
safe.

A simple and obvious workaround is to replace all calls of the form:

	(not (null ...))

with

	(if (not (null ...)) t)


Happy hacking!

							Brant




--
Brant A. Cheikes
The MITRE Corporation, 202 Burlington Road, M/S K331, Bedford MA 01730 USA
Email: ·····@linus.mitre.org, Voice: +1 617 271 7505, FAX: +1 617 271 2352