Memory fault during compilation (BIGNUM related?)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
x86-64, "2.2.11.
(defpackage :bug106
(:use :common-lisp)
(:export :bug106))
(in-package :bug106)
(defmacro int-restrict (form tp)
(cond
((member tp '(integer (integer) (integer *) (integer * *)) :test 'equal)
form)
((and (consp tp) (eql (car tp) 'integer) (integerp (cadr tp)) (integerp (caddr tp)))
(let ((lo (cadr tp))
(hi (caddr tp)))
`(min ,hi (max ,lo ,form))))
(t (error "Cannot handle this type in int-restrict: ~A" tp))))
(define-condition innocuous-failure (simple-condition) ()
(:documentation "Failures that, when they occur, do not indicate the test failed"))
(define-condition require-failure (innocuous-failure) ()
(:documentation "Error signalled by REQUIRE-TYPE when the value is not of the specified
type. This is intended to indicate that the test is bogus, not failed."))
(defparameter *require-
"Set to true when CHECK-REQUIRE-TYPE succeeded. Used to indicate that checks
should be removed.")
(defun check-require-type (v tp)
(if (typep v tp)
(setf *require-
(signal (make-condition 'require-failure
(defvar *no-require-type* nil
"Controls whether REQUIRE-TYPE inserts a type check or not")
(defmacro require-type (form tp)
"When FORM is not of type TP, signal a REQUIRE-FAILURE condition that indicates
the test was bad. When the special variable *NO-REQUIRE-TYPE* is true, omit
the check."
(if *no-require-type*
form
(let ((form-var (gensym)) (tp-var (gensym)))
`(let ((,form-var ,form)
(defun f (b)
(declare (notinline / rational +))
(+
(rational
(/
(/
(integer -4397321656545 38967))
-1)
-1))
b))
==>
CORRUPTION WARNING in SBCL pid 40056 tid 40056:
Memory fault at 0x7ffa997fff1 (pc=0x52a2dc9c [code 0x52a2bf40+0x1D5C ID 0x1d9f], fp=0x7f59d73fe718, sp=0x7f59d73fe6a0) tid 40056
The integrity of this image is possibly compromised.
Continuing with fingers crossed.
While evaluating the form starting at line 50, column 0
of #P"/home/
debugger invoked on a SB-SYS:
#<THREAD "main thread" RUNNING {10010A0003}>:
Unhandled memory fault at #x7FFA997FFF1.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [RETRY ] Retry EVAL of current toplevel form.
1: [CONTINUE] Ignore error and continue loading file "/home/
2: [ABORT ] Abort loading file "/home/
3: Exit debugger, returning to top level.
(SB-BIGNUM:
0]
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Note that 4397321682944 is not a BIGNUM.