From cacfac8c22699a62fefab099866b65f490478571 Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Tue, 15 Mar 2005 18:21:29 +0000 Subject: [PATCH] 0.8.20.23: Fix some GC problems introduced in the x86-64 immediate single-floats commit: * Make gencgc understand immediate single-floats too. * Fix typo in purify. Test changes: * Don't test floating-point overflow detection on x86-64, add a BUGS entry. * Change #-(x86 linux) to #-(and x86 linux) in debug.impure.lisp. --- BUGS | 5 +++++ src/runtime/gencgc.c | 16 ++++++++++++++++ src/runtime/purify.c | 2 +- tests/debug.impure.lisp | 2 +- tests/float.pure.lisp | 2 +- version.lisp-expr | 2 +- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/BUGS b/BUGS index 93b3ecb..0f5554a 100644 --- a/BUGS +++ b/BUGS @@ -2097,3 +2097,8 @@ WORKAROUND: arrange such that arguments can be passed to the function called from arrange_return_to_lisp_function(), but this looked hard to do in general without suffering from memory leaks. + +378: floating-point exceptions not signalled on x86-64 + Floating point traps are currently not enabled on the x86-64 port. + This is true for at least overflow detection (as tested in + float.pure.lisp) and divide-by-zero. diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index f7f45a7..1dcfd35 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -2077,10 +2077,16 @@ possibly_valid_dynamic_space_pointer(lispobj *pointer) if ((is_lisp_pointer(start_addr[0]) || (fixnump(start_addr[0])) || (widetag_of(start_addr[0]) == CHARACTER_WIDETAG) +#if N_WORD_BITS == 64 + || (widetag_of(start_addr[0]) == SINGLE_FLOAT_WIDETAG) +#endif || (widetag_of(start_addr[0]) == UNBOUND_MARKER_WIDETAG)) && (is_lisp_pointer(start_addr[1]) || (fixnump(start_addr[1])) || (widetag_of(start_addr[1]) == CHARACTER_WIDETAG) +#if N_WORD_BITS == 64 + || (widetag_of(start_addr[1]) == SINGLE_FLOAT_WIDETAG) +#endif || (widetag_of(start_addr[1]) == UNBOUND_MARKER_WIDETAG))) break; else { @@ -2127,6 +2133,9 @@ possibly_valid_dynamic_space_pointer(lispobj *pointer) switch (widetag_of(start_addr[0])) { case UNBOUND_MARKER_WIDETAG: case CHARACTER_WIDETAG: +#if N_WORD_BITS == 64 + case SINGLE_FLOAT_WIDETAG: +#endif if (gencgc_verbose) FSHOW((stderr, "*Wo3: %x %x %x\n", @@ -2176,7 +2185,9 @@ possibly_valid_dynamic_space_pointer(lispobj *pointer) case FDEFN_WIDETAG: case CODE_HEADER_WIDETAG: case BIGNUM_WIDETAG: +#if N_WORD_BITS != 64 case SINGLE_FLOAT_WIDETAG: +#endif case DOUBLE_FLOAT_WIDETAG: #ifdef LONG_FLOAT_WIDETAG case LONG_FLOAT_WIDETAG: @@ -3186,6 +3197,9 @@ verify_space(lispobj *start, size_t words) case VALUE_CELL_HEADER_WIDETAG: case SYMBOL_HEADER_WIDETAG: case CHARACTER_WIDETAG: +#if N_WORD_BITS == 64 + case SINGLE_FLOAT_WIDETAG: +#endif case UNBOUND_MARKER_WIDETAG: case INSTANCE_HEADER_WIDETAG: case FDEFN_WIDETAG: @@ -3248,7 +3262,9 @@ verify_space(lispobj *start, size_t words) /* unboxed objects */ case BIGNUM_WIDETAG: +#if N_WORD_BITS != 64 case SINGLE_FLOAT_WIDETAG: +#endif case DOUBLE_FLOAT_WIDETAG: #ifdef COMPLEX_LONG_FLOAT_WIDETAG case LONG_FLOAT_WIDETAG: diff --git a/src/runtime/purify.c b/src/runtime/purify.c index 35635ee..6f3bb42 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -208,7 +208,7 @@ valid_dynamic_space_pointer(lispobj *pointer, lispobj *start_addr) || ((start_addr[0] & FIXNUM_TAG_MASK) == 0) /* fixnum */ || (widetag_of(start_addr[0]) == CHARACTER_WIDETAG) #if N_WORD_BITS == 64 - || (widetag_of(start_addr[1]) == SINGLE_FLOAT_WIDETAG) + || (widetag_of(start_addr[0]) == SINGLE_FLOAT_WIDETAG) #endif || (widetag_of(start_addr[0]) == UNBOUND_MARKER_WIDETAG)) && (is_lisp_pointer(start_addr[1]) diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index 683d460..1b31eb1 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -147,7 +147,7 @@ ;; bug 353: This test fails at least most of the time for x86/linux ;; ca. 0.8.20.16. -- WHN - #-(x86 linux) + #-(and x86 linux) (assert (verify-backtrace (lambda () (test #'not-optimized)) (list *undefined-function-frame* diff --git a/tests/float.pure.lisp b/tests/float.pure.lisp index a7813e3..dba1bed 100644 --- a/tests/float.pure.lisp +++ b/tests/float.pure.lisp @@ -91,7 +91,7 @@ least-positive-double-float)) (assert (= 0.0 (scale-float 1.0 most-negative-fixnum))) (assert (= 0.0d0 (scale-float 1.0d0 (1- most-negative-fixnum)))) -#-darwin ;; bug 372 +#-(or darwin x86-64) ;; bug 372 / 378 (progn (assert (raises-error? (scale-float 1.0 most-positive-fixnum) floating-point-overflow)) diff --git a/version.lisp-expr b/version.lisp-expr index 2a431fb..b9ff2b2 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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.8.20.22" +"0.8.20.23" -- 1.7.10.4