Opened 10 years ago
Closed 10 years ago
#388 closed defect (fixed)
Fixnum.equalp() regression between 1.3.1 and trunk
Reported by: | ehuelsmann | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3.2 |
Component: | interpreter | Version: | 1.4.0-dev |
Keywords: | Cc: | ||
Parent Tickets: |
Description
The failed test in stmx looks more serious.
I have reduced it to the following code, which prints
; Evaluation aborted on NIL.
instead of returning the expected hash-table object:
(let ((h1 (make-hash-table :test 'equalp)) (h2 (make-hash-table :test 'equalp)) (h (make-hash-table :test 'equalp))) (setf (gethash 1 h1) 2 (gethash 2 h2) 1 (gethash h1 h) h2 (gethash h2 h) h1) h)
So, running the code through the interpreter @14753, I see this output:
D:\abcl\abcl-j>abcl Armed Bear Common Lisp 1.4.0-dev-svn-14753M Java 1.7.0_51 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.266 seconds. Startup completed in 3.938 seconds. Type ":help" for a list of available commands. CL-USER(1): (let ((h1 (make-hash-table :test 'equalp)) (h2 (make-hash-table :test 'equalp)) (h (make-hash-table :test 'equalp))) (setf (gethash 1 h1) 2 (gethash 2 h2) 1 (gethash h1 h) h2 (gethash h2 h) h1) h) java.lang.NullPointerException at org.armedbear.lisp.Fixnum.equalp(Fixnum.java:231) at org.armedbear.lisp.HashTable.equalp(HashTable.java:150) at org.armedbear.lisp.HashTable$EqualpComparator.keysEqual(HashTable.jav a:439) at org.armedbear.lisp.HashTable.getEntry(HashTable.java:258) at org.armedbear.lisp.HashTable.put(HashTable.java:286) at org.armedbear.lisp.HashTable.puthash(HashTable.java:217) at org.armedbear.lisp.HashTableFunctions$pf_puthash.execute(HashTableFun ctions.java:183) at org.armedbear.lisp.LispThread.execute(LispThread.java:851) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:589) at org.armedbear.lisp.Lisp.eval(Lisp.java:540) at org.armedbear.lisp.Lisp.eval(Lisp.java:533) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) at org.armedbear.lisp.SpecialOperators$sf_progn.execute(SpecialOperators .java:273) at org.armedbear.lisp.Lisp.eval(Lisp.java:530) at org.armedbear.lisp.Lisp.eval(Lisp.java:533) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) at org.armedbear.lisp.SpecialOperators._let(SpecialOperators.java:169) at org.armedbear.lisp.SpecialOperators$sf_let.execute(SpecialOperators.j ava:101) at org.armedbear.lisp.Lisp.eval(Lisp.java:530) at org.armedbear.lisp.Primitives$pf__eval.execute(Primitives.java:345) at org.armedbear.lisp.LispThread.execute(LispThread.java:814) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:575) at org.armedbear.lisp.Lisp.eval(Lisp.java:540) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3742) at org.armedbear.lisp.Lisp.eval(Lisp.java:530) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) at org.armedbear.lisp.Closure.execute(Closure.java:220) at org.armedbear.lisp.Closure.execute(Closure.java:148) at org.armedbear.lisp.LispThread.execute(LispThread.java:814) at org.armedbear.lisp.Lisp$1.execute(Lisp.java:285) at org.armedbear.lisp.Symbol.execute(Symbol.java:803) at org.armedbear.lisp.LispThread.execute(LispThread.java:814) at org.armedbear.lisp.top_level_47.execute(top-level.lisp:407) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.Symbol.execute(Symbol.java:793) at org.armedbear.lisp.LispThread.execute(LispThread.java:798) at org.armedbear.lisp.top_level_48.execute(top-level.lisp:415) at org.armedbear.lisp.LispThread.execute(LispThread.java:798) at org.armedbear.lisp.Interpreter.run(Interpreter.java:361) at org.armedbear.lisp.Main$1.run(Main.java:48) at java.lang.Thread.run(Thread.java:744) #<THREAD "interpreter" {3F12FC36}>: Debugger invoked on condition of type ERROR Caught java.lang.NullPointerException. Restarts: 0: TOP-LEVEL Return to top level.
Attachments (1)
Change History (4)
comment:1 Changed 10 years ago by
Milestone: | → 1.3.2 |
---|---|
Version: | → 1.4.0-dev |
Changed 10 years ago by
Attachment: | abcl-14755-equalp-fix-3.diff added |
---|
comment:2 Changed 10 years ago by
In <https://mailman.common-lisp.net/pipermail/armedbear-devel/2015-April/003452.html>, Max proposes the attached patch. He suggests:
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
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
massimiliano.ghilardi@gmail-ticket-388