Opened 5 years ago

Closed 5 years ago

#1211 closed defect (fixed)

Compiler bug in multiplying fixnums

Reported by: matt.kaufmann Owned by: gb
Priority: critical Milestone:
Component: Compiler Version: trunk
Keywords: fixnum Cc:

Description

The log below shows an incorrect evaluation result.

I've marked this as "critical", but perhaps it should be "blocker". ACL2 relies on such multiplication being correct for its own checksum computations. We are hoping to release a new version of ACL2 this week.

Welcome to Clozure Common Lisp Version 1.10-dev-r16148M-trunk  (LinuxX8664)!
? (defun foo (u v)
    (declare (type fixnum u v))
    (* u v))
FOO
? most-positive-fixnum
1152921504606846975
? (foo 100000000000 100000000000)
-441130959790669824
? 

Change History (3)

comment:1 Changed 5 years ago by matt.kaufmann

This bug seems rather recent. I've been told that it doesn't show up for my example on 1.10-dev-r16062M-trunk (DarwinX8664), and the log below shows that it doesn't show up in Linux on a slightly older version.

Welcome to Clozure Common Lisp Version 1.10-dev-r15972M-trunk  (LinuxX8664)!
? (defun foo (u v)
     (declare (type fixnum u v))
     (* u v))
FOO
? (foo 100000000000 100000000000)
10000000000000000000000
? 

comment:2 Changed 5 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

comment:3 Changed 5 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [16149]) Try harder in BOUNDED-INTEGER-TYPE-FOR-MULTIPLICATION. Fixes ticket:1211 .

Note: See TracTickets for help on using tickets.