Date: Sat, 6 Aug 2022 07:14:30 GMT From: Kirill Ponomarev <krion@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: c75e77f313a5 - 2022Q3 - lang/sbcl: Fix a regression in sbcl 2.2.7 Message-ID: <202208060714.2767EU7w025589@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2022Q3 has been updated by krion: URL: https://cgit.FreeBSD.org/ports/commit/?id=c75e77f313a5fe9f81e9b6851f8a5c4daa18f2b5 commit c75e77f313a5fe9f81e9b6851f8a5c4daa18f2b5 Author: Kirill Ponomarev <krion@FreeBSD.org> AuthorDate: 2022-08-06 07:12:45 +0000 Commit: Kirill Ponomarev <krion@FreeBSD.org> CommitDate: 2022-08-06 07:14:26 +0000 lang/sbcl: Fix a regression in sbcl 2.2.7 PR: 265661 Reported by: dmgk, jinxiaoyong@gmail.com (cherry picked from commit 5b9ecf3b2bf6d15cedad7a96a04fe335c73a58cb) --- lang/sbcl/Makefile | 4 ++-- .../files/patch-src_runtime_Config.x86-64-freebsd | 20 ++++++++++++++++++++ lang/sbcl/files/patch-src_runtime_stringspace.c | 16 ++++++++++++++++ lang/sbcl/files/patch-tests_save1.test.sh | 20 ++++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile index da80ec8b76a2..34052fefc3cd 100644 --- a/lang/sbcl/Makefile +++ b/lang/sbcl/Makefile @@ -5,7 +5,7 @@ PORTNAME= sbcl DISTVERSION= 2.2.7 DISTVERSIONSUFFIX= -source -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= lang lisp MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION} \ @@ -143,7 +143,7 @@ post-patch: ${WRKSRC}/doc/manual/start-stop.texinfo do-build: - (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} LINKFLAGS="${LDFLAGS}" ${SH} make.sh ${MAKE_SH_ARGS}) + (cd ${WRKSRC} && ${SH} make.sh ${MAKE_SH_ARGS}) post-build-DOCS-on: ${DO_MAKE_BUILD} -C ${WRKSRC}/doc/manual info html diff --git a/lang/sbcl/files/patch-src_runtime_Config.x86-64-freebsd b/lang/sbcl/files/patch-src_runtime_Config.x86-64-freebsd new file mode 100644 index 000000000000..43b2a9d39cec --- /dev/null +++ b/lang/sbcl/files/patch-src_runtime_Config.x86-64-freebsd @@ -0,0 +1,20 @@ +From 9de74a0d4d0f1f38db5ae7e891480d8a4b4ad8d9 Mon Sep 17 00:00:00 2001 +From: Douglas Katzman <dougk@google.com> +Date: Tue, 2 Aug 2022 14:40:28 -0400 +Subject: [PATCH] Add /usr/local/include for freebsd + +https://wiki.freebsd.org/WarnerLosh/UsrLocal says something about it. + +Should fix lp#1981112. +--- src/runtime/Config.x86-64-freebsd.orig 2022-07-29 14:39:18 UTC ++++ src/runtime/Config.x86-64-freebsd +@@ -15,7 +15,8 @@ include Config.x86-64-bsd + # worked fine for most things, but LOAD-FOREIGN & friends require + # dlopen() etc., which in turn depend on dynamic linking of the + # runtime. +-OS_LIBS += -lutil ++OS_LIBS += -lutil -L/usr/local/lib ++CPPFLAGS += -isystem/usr/local/include + + # use libthr (1:1 threading). libpthread (m:n threading) does not work. + ifdef LISP_FEATURE_SB_THREAD diff --git a/lang/sbcl/files/patch-src_runtime_stringspace.c b/lang/sbcl/files/patch-src_runtime_stringspace.c new file mode 100644 index 000000000000..f4c0fd029b64 --- /dev/null +++ b/lang/sbcl/files/patch-src_runtime_stringspace.c @@ -0,0 +1,16 @@ +From 48d686f9718f98122547a9006c871cfcd50439ab Mon Sep 17 00:00:00 2001 +From: Douglas Katzman <dougk@google.com> +Date: Sun, 31 Jul 2022 21:38:19 -0400 +Subject: [PATCH] Accept that value-cell-value can move to R/O space + +Fixes lp#1983218 +--- src/runtime/stringspace.c.orig 2022-07-29 14:39:18 UTC ++++ src/runtime/stringspace.c +@@ -76,6 +76,7 @@ static void visit_pointer_words(lispobj* object, lispo + widetag == RATIO_WIDETAG || widetag == COMPLEX_WIDETAG || + widetag == SIMPLE_ARRAY_WIDETAG || + (widetag >= COMPLEX_BASE_STRING_WIDETAG && widetag <= COMPLEX_ARRAY_WIDETAG) || ++ widetag == VALUE_CELL_WIDETAG || + widetag == WEAK_POINTER_WIDETAG) { + int len = object_size(object), i; + for (i=1; i<len; ++i) FIX(object[i]); diff --git a/lang/sbcl/files/patch-tests_save1.test.sh b/lang/sbcl/files/patch-tests_save1.test.sh new file mode 100644 index 000000000000..2a5fda69fa1c --- /dev/null +++ b/lang/sbcl/files/patch-tests_save1.test.sh @@ -0,0 +1,20 @@ +From 48d686f9718f98122547a9006c871cfcd50439ab Mon Sep 17 00:00:00 2001 +From: Douglas Katzman <dougk@google.com> +Date: Sun, 31 Jul 2022 21:38:19 -0400 +Subject: [PATCH] Accept that value-cell-value can move to R/O space + +Fixes lp#1983218 +--- tests/save1.test.sh.orig 2022-07-29 14:39:18 UTC ++++ tests/save1.test.sh +@@ -23,6 +23,11 @@ run_sbcl <<EOF + ;; but maybe someone changed it :immobile, so bind it to be certain. + (let (#+immobile-code (sb-c::*compile-to-memory-space* :dynamic)) + (defvar *afun* (compile nil '(lambda (x) (- (length x)))))) ++ ;; test for lp#1983218 - a VALUE-CELL holding a readonly string could crash ++ (defun mkcell (x) (sb-sys:%primitive sb-vm::make-value-cell x nil)) ++ (compile 'mkcell) ++ (defvar *cell* (mkcell (symbol-name '*print-base*))) ++ ;; + (save-lisp-and-die "$tmpcore") + EOF + run_sbcl_with_core "$tmpcore" --noinform --no-userinit --no-sysinit --noprint \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208060714.2767EU7w025589>