liutanyu / mcl

Automatically exported from code.google.com/p/mcl
Other
0 stars 0 forks source link

crash from optimized double-float given bad arg #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Another irrelevance, posted in case of use to others ...

(defun test (x)
  (declare (double-float x)
           (optimize (speed 3) (safety 0)))
  (zerop (the double-float (mod x 100))))

Calling with fixnum rather than double 
  (WARNING: this causes sudden death crash):
(test 1)

CLZ manages to catch this gracefully.

The crash report shows:
Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000000a
...
so if you have some crash with this report, perhaps it is a type violation.

Original issue reported on code.google.com by p2.edoc@gmail.com on 9 Nov 2009 at 5:47