;;; 2: eliminated non-ANSI %DEFCONSTANT/%%DEFCONSTANT support,
;;; deleted a slot from DEBUG-SOURCE structure
;;; 3: added build ID to cores to discourage sbcl/.core mismatch
-(defconstant sbcl-core-version-integer 3)
+;;; 4: added gc page table data
+(defconstant sbcl-core-version-integer 4)
(defun round-up (number size)
#!+sb-doc
;;; tests for a sign extension problem in callback argument handling on x86-64
-(with-test (:name sign-extension)
- (let ((*add-two-ints*
- (sb-alien::alien-callback (function int int int) #'+)))
- (assert (= (alien-funcall *add-two-ints* #x-80000000 1)
- -2147483647))
- (assert (= (alien-funcall *add-two-ints* #x-80000000 -1)
- #x7fffffff))))
+(defvar *add-two-ints* (sb-alien::alien-callback (function int int int) #'+))
+
+(with-test (:name :sign-extension)
+ (assert (= (alien-funcall *add-two-ints* #x-80000000 1) -2147483647)))
+
+;;; On x86 This'll signal a TYPE-ERROR "The value -2147483649 is not of type
+;;; (SIGNED-BYTE 32)". On x86-64 it'll wrap around to 2147483647, probably
+;;; due to the sign-extension done by the (INTEGER :NATURALIZE-GEN)
+;;; alien-type-method. I believe the former behaviour is the one we want.
+;;; -- JES, 2005-10-16
+
+(with-test (:name :underflow-detection :fails-on :x86-64)
+ (assert (raises-error? (alien-funcall *add-two-ints* #x-80000000 -1))))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.5.73"
+"0.9.5.74"