fare/lisp-interface-library

Test failures on CCL, CLISP, and ECL

Closed this issue · 5 comments

I added a cl-travis setup on my fork and discovered test failures on several implementations: https://travis-ci.org/DalekBaldwin/lisp-interface-library/builds/76055906

I haven't looked close enough yet to understand the failures in detail.

fare commented

Thanks for the test results. So it works on many implementations, but has weird bug on other implementations. I'll blame the implementations :-( Unhappily, that doesn't help much.

Particularly unsettling is why this would work on CCL but fail on CCL32.

fare commented

Unhappily, I don't have much time to pour on it for now...

fare commented

commit 4028de3 fixes the tests on clisp. Maybe on other implementations, too.

Basically, on clisp, (hash-table-test (make-hash-table :test 'equal)) returns EXT:FASTHASH-EQUAL and not EQUAL, so normalize-eq-function needs to be smarter.

fare commented

I tried on ecl: it was failing with SEGMENTATION-VIOLATION at semi-random places. Not good. Sent a bug report to the ECL mailing-list.

I could reproduce the failure on ccl32 using the ./lx86cl in svn. Weird. To reproduce:
rlwrap ./lx86cl --eval "'(#.(require "asdf")#.(asdf:make :lil/test)#.(setf lil/test/base:verbose t)#.(asdf:test-system :lil))"
The verbose flag narrows the failure to the DIVIDE-AND-SIZE test in the call:
(lil/test/pure-map::simple-linear-map-test lil/pure/hash-table:)

Investigating...

fare commented

(divide (alist-map* '((7 . "VII") (79 . "LXXIX"))))
==>
#<AVL-TREE-NODE ((NIL (229378 (79 . "LXXIX")) NIL) (557088 (7 . "VII")) NIL)>

It failed to divide this two-bucket hash-table, instead rotating the underlying avl-tree.
Worse, this particular invocation fails on SBCL x64, too!
We can reduce the test case to:
(divide (alist-map* '((557088 . 7) (229378 . 79))))

And that was indeed a bug in divide, that failed to account for the case where the left of the node is null. Oops. I looked at the stateful code, and it does the right thing. Sigh.

Well, thanks a lot for finding that bug. The tests now pass on ccl32, and I added a regression test.

I'll mark this bug as resolved. Please reopen if anything comes out in new tests that are not an obvious implementation bug (as in the ECL segfaults I'm experiencing).

Sorry for the delay in fixing the bug and thanks A LOT for helping find it!