From 3fa2feb10ab827fc6cc2a85287e78b6e66b7bf4d Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Sat, 27 Feb 2010 16:01:21 +0000 Subject: [PATCH] 1.0.35.19: fix SB-EXT:GENERATION-* accessors for generation > 0 Add the `lutexes' slot to `struct generation' as defined from Lisp. Not paying attention to OAOO bites again. Unfortunately, several things are still OAOOM... --- NEWS | 2 ++ src/code/gc.lisp | 4 +++- tests/gc.impure.lisp | 10 ++++++++++ version.lisp-expr | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 68ac632..c58fb1f 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,8 @@ changes relative to sbcl-1.0.35: before reaching the erring stack frame. * bug fix: Fix type derivation for EXPT when raising a fixnum to a real power. (launchpad bug lp#525949) + * bug fix: Fix SB-EXT:GENERATION-* accessors for generations > 0 on + GENCGC platforms. (launchpad bug lp#529014) changes in sbcl-1.0.35 relative to sbcl-1.0.34: * optimization: ROUND with a single single-float or double-float argument diff --git a/src/code/gc.lisp b/src/code/gc.lisp index 8839b3e..eb7f13d 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -346,7 +346,9 @@ collection is initiated. This can be set with SETF." (number-of-gcs int) (number-of-gcs-before-promotion int) (cum-sum-bytes-allocated unsigned-long) - (minimum-age-before-gc double))) + (minimum-age-before-gc double) + ;; `struct lutex *' or `void *', depending. + (lutexes (* char)))) #!+gencgc (define-alien-variable generations diff --git a/tests/gc.impure.lisp b/tests/gc.impure.lisp index c00438b..fbe284b 100644 --- a/tests/gc.impure.lisp +++ b/tests/gc.impure.lisp @@ -52,3 +52,13 @@ (sleep 1) (assert gc-happend))) +;;; SB-EXT:GENERATION-* accessors returned bogus values for generation > 0 +#+gencgc +(with-test (:name :bug-529014) + ;; FIXME: These parameters are a) tunable in the source and b) + ;; duplicated multiple times there and now here. It would be good to + ;; OAOO-ify them (probably to src/compiler/generic/params.lisp). + (loop for i from 0 to sb-vm:+pseudo-static-generation+ + do (assert (= (sb-ext:generation-bytes-consed-between-gcs i) 2000000)) + (assert (= (sb-ext:generation-minimum-age-before-gc i) 0.75)) + (assert (= (sb-ext:generation-number-of-gcs-before-promotion i) 1)))) diff --git a/version.lisp-expr b/version.lisp-expr index c828100..bca08cd 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".) -"1.0.35.18" +"1.0.35.19" -- 1.7.10.4