Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lang/sbcl: Fix a regression in sbcl 2.2.7
PR: 265661 Reported by: dmgk, jinxiaoyong@gmail.com (cherry picked from commit 5b9ecf3)
- Loading branch information
Showing
4 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 \ |