cl-test-grid results for svn revision 14755

Mark Evenson evenson at panix.com
Sat Apr 11 07:59:21 UTC 2015



On 2015/4/8 20:13, Massimiliano Ghilardi wrote:
[…]
>> Only I am surprised that LispObjects can be null: is it allowed, and
>> when can it happen?

As far as I can determine, LispObject references should never be null
when being passed as an argument to a Java function, but the code base
is inconsistent (buggy) on this point.

>> Max
> 
> In attachment a patch that should fix issue 388.
> 
> Before accepting it, please check whether ABCL is really supposed to
> pass null LispObjects to the Java implementation of primitive types: the
> NullPointerException was due to a call to
> Fixnum.equalp(LispObject obj) with obj == null
> 
> Regards,
> 
> Max

Your patch has been applied as [r14757][].

As for your question on "whether ABCL is really supposed to pass null
LispObject references to the Java implementation of primitive types", I
think the answer is negative, as a Java primitive type by definition
cannot hold a null reference.  This disjunction from java.lang.Object is
what "makes" it a primitive type.  Our codebase is riddled with the
assumption that accessing a LispObject won't return a null, as in the
location your [test case failed][1]:

    if (!value.equalp(ht.get(key))) {
      return false;
    }

Here, ht.get() should not return a null reference to be chained into the
value.equalp() call no matter what the value of 'key' turns out to be.
In lieu of something like a comprehensive audit, we are unfortunately
left fixing these problems on a case by case basis.

But perhaps I have misunderstood your question somewhat:  is there
something more specific you were referring to?

[r14757]: http://abcl.org/trac/changeset/14757
[1]:
http://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/HashTable.java#L150

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."



More information about the armedbear-devel mailing list