diff options
author | asau <asau@pkgsrc.org> | 2013-06-11 19:26:28 +0000 |
---|---|---|
committer | asau <asau@pkgsrc.org> | 2013-06-11 19:26:28 +0000 |
commit | 2a919d144dab50400d49a24556101aa23c4ccf5e (patch) | |
tree | f1446bd0d76f209e2a04548629b00924065e6e22 /lang/sbcl | |
parent | 102e163ba2977d0344f68378fb436868de40faa2 (diff) | |
download | pkgsrc-2a919d144dab50400d49a24556101aa23c4ccf5e.tar.gz |
Update to SBCL 1.1.8
changes in sbcl-1.1.8 relative to sbcl-1.1.7:
* notice: The implementation of MAP-ALLOCATED-OBJECTS (the heart of
ROOM, plus a few SB-INTROSPECT functions) has been completely
rewritten; it may now exhibit different bugs than before.
* new feature: minimal runtime/compiler intrastructure support for SSE
SIMD values, as SB-EXT:SIMD-PACK. Enabled on x86-64 via the build-time
feature :sb-simd-pack. This should enable intrinsics extensions as
libraries, without patching SBCL itself. Thanks to Alexander Gavrilov
for maintaining a branch for so long.
* enhancement: RUN-PROGRAM supports a :DIRECTORY argument to set
the working directory of the spawned process.
(lp#791800) (patch by Matthias Benkard)
* enhancement: boxed vectors (vectors of T or of FIXNUM) can now be
stack-allocated on PPC.
* enhancement: "fixed objects" can now be stack-allocated on PPC.
* enhancement: WITH-PINNED-OBJECTS no longer conses on PPC/GENCGC.
* enhancement: (sb-introspect:find-definition-sources-by-name x :vop) now
also returns VOPs which do not translate any functions, and finds
defoptimizer types ir2convert and stack-allocate-result.
* enhancement: better type derivation for APPEND, NCONC, LIST.
(lp#538957)
* enhancement: MAP-ALLOCATED-OBJECTS (the heart of ROOM) now walks the
heap in a manner similar to the GC rather than its previous ad-hoc
scheme, and is therefore no less and possibly more accurate.
* fixes and enhancements related to Unicode:
** the character database information has been updated to Unicode 6.2;
** support for canonical and compatibility decomposition of characters has
been added, along with support for primary composition;
** support for Unicode normalization forms of strings (NFC, NFKC, NFD and
NFKD) has been included;
** querying the character database for code points not defined by Unicode
gives less wrong answers (lp#1178038, reported by Ken Harris)
* enhancement: print intermediate evaluation results for some ASSERTed
expressions. (lp#789497) (patch by Alexandra Barchunova)
* enhancement: x86-64 disassemblies are annotated with unboxed constant
values when there are references to (RIP-relative) unboxed constants.
* bug fix: type derivation for LOG{AND,IOR,XOR} scales linearly instead
of quadratically with the size of the input in the worst case.
(lp#1096444)
* bug fix: handle errors when initializing *default-pathname-defaults*,
sb-ext:*runtime-pathname*, sb-ext:*posix-argv* on startup, like character
decoding errors, or directories being deleted.
* bug fix: Loading a core with a discontiguous dynamic space now correctly
computes the amount of dynamic space used.
* bug fix: disassembler missing ",8" on SHLD
* bug fix: backtracing through INTERNAL-ERROR signal handlers on systems
that provide an "invalid" stack frame link for the signal handler
itself now use the saved-fp-and-pc mechanism to pick up from the stack
frame in the interrupt (signal) context. This is known to affect
threaded FreeBSD/x86-64.
* bug fix: some LOOP statements couldn't be compiled.
(lp#1178989)
* bug fix: sb-sequence:dosequence works on literal vectors.
* bug fix: errors in generic arithmetic show the assembly routine's
caller on x86 and x86-64. (lp#800343)
* bug fix: Compile-time type errors should never result in COMPILE-FILE
failure. (lp#943953)
* bug fix: Known bad local calls do not cause strange failures when
emitting or dumping code. (lp#504121)
* bug fix: Multiply-inlined structure constructor don't cause IR2-time
codegen errors: type checks are inserted as necessary. (lp#1177703)
* bug fix: Unsigned modular arithmetic is correctly converted into signed
modular arithemtic (mostly to exploit fixnum-width VOPs). (lp#1026634)
* bug fix: a combination of inlined local function with &optional and
recursion no longer causes undescriptive compiler errors. (lp#1180992)
* bug fix: sub-word BOOLEAN alien types now disregard higher order bits
when testing for non-zero-ness.
* bug fix: (CONCATENATE 'null ...) no longer fails for generic sequences.
(lp#1162301)
* bug fix: Type mismatch for the value of conditional expressions are
correctly reported when detected at compile-time, instead of complaining
about a constant NIL (similar for non-EQ-comparable catch tags).
* bug fix: Referring to INLINE global functions as values should not result
in a compilation failure. (lp#1035721)
* optimization: faster ISQRT on fixnums and small bignums
* optimization: faster and smaller INTEGER-LENGTH on fixnums on x86-64.
* optimization: On x86-64, the number of multi-byte NOP instructions used
for code alignment is now always minimal.
* optimization: On 64-bit targets, the compiler generates much faster
code for type checks for types known at compile time that are smaller
than (SIGNED-BYTE 64) or (UNSIGNED-BYTE 64) and larger than FIXNUM, and
their COMPLEX variants.
* optimization: On x86 targets, more uses of ALIEN-FUNCALL during cross
compilation now inline the INVOKE-WITH-SAVED-FP-AND-PC dance.
* optimization: ROOM no longer conses so egregiously on non-x86oid
systems.
* optimization: associative bitwise operations reassociate patterns like
(f (f x k1) k2) to expose (f x (f k1 k2)). Same for + and * of
rational values.
* optimization: quasiquote expressions now perform more constant folding,
instead of consing equal lists at runtime. (lp#1026439)
* optimization: local call analysis of inlined higher-order function
should converge more quickly, resulting in better code for complex
functions.
* optimization: On x86-64, medium (word-sized but wider than 32 bits)
integer constants are handled more cleverly, especially when they
can be represented as sign-extended (signed-byte 32). (Based on a
patch by Douglas Katzman)
* optimization: IF/IF conversion should reliably result in sane code
when (some of) the results of the inner IF are always false or
always true.
* optimization: On x86oids, variable right shifts of machine words are
compiled into straight SAR/SHR, instead of going through the generic
VOP. (lp#1066204)
changes in sbcl-1.1.7 relative to sbcl-1.1.6:
* enhancement: TRACE :PRINT-ALL handles multiple-valued forms.
(lp#457053)
* bug fix: :allocation slot option works for condition slots
(lp#1049404)
* bug fix: redefining conditions does not lead to multiple evaluations of
hairy slot initfunctions anymore (lp#1164969)
* bug fix: CLASS-DIRECT-DEFAULT-INITARGS now works for condition classes
(lp#1164970)
* bug fix: function constants now work as initforms and default initarg
values of conditions (lp#539517)
* bug fix: svref/(setf svref) on symbol macros don't crash the compiler
anymore. (Minimal test case provided by James M. Lawrence on sbcl-devel)
* bug fix: no more bogus ## references when pretty printing backquoted
forms with non-trivial structure sharing. (lp#1161218)
* bug fix: Don't signal an error on (setf (documentation nil 'function)
"doc"). Signal a style-warning instead when trying to set documentation
of NIL for all other documentation types. (Reported by Zach
Beane; regression since 2e52fa05.)
* bug fix: modular arithmetic involving large constants and conditionals
should no longer result in spurious dead code elimination. (Reported by
Eric Marsden).
* bug fix: our mach exception handler can seemingly called very early in
the program execution process on OS X 10.8.0. Try and handle that case
robustly, without potentially leaking mach ports too much.
* optimization: LOGBITP and LOGTEST optimizations from x86 ported to x86_64.
changes in sbcl-1.1.6 relative to sbcl-1.1.5:
* enhancement: the continuable error when defknown-ing over extant
fndb entries can be ignored by passing :overwrite-fndb-silently t
as a keyword argument to sb-c:defknown (after attributes). Useful
to allow defknown to be re-loaded. Use with :allow-other-keys t
for backward compatibility.
* optimization: compiler is much faster in compiling SVREF and (SETF SVREF)
forms.
* bug fix: Prevent a make-array transform from modifying source forms
causing problems for inlined code. Thanks to Bart Botta.
(regression since 1.0.42.11-bis)
* bug fix: clear-output calls the correct gray stream routine,
sb-gray:stream-clear-output. (lp#1153257)
* bug fix: an error is signalled for an invalid format modifier: ~<~@>.
(lp#1153148)
* bug fix: Better error messages for package operations (lp#1154776)
* bug fix: delete-package on a nonexistent package should signal a cerror.
(regression since 1.0.37.44).
* bug fix: accessing &MORE (stack allocated &REST) arguments checks bounds.
(lp#1154946, lp#1072112)
* bug fix: compiling make-array no longer signals an error when the
element-type is an uknown type, a warning is issued instead.
Thanks to James Kalenius (lp#1156095)
* bug fix: SEARCH on generic (non-VECTOR non-LIST) sequence types no longer
produces wrong results for some inputs. (Thanks to Jan Moringen.)
(lp#1153312)
changes in sbcl-1.1.5 relative to sbcl-1.1.4:
* minor incompatible change: SB-SPROF:WITH-PROFILING no longer loops
by default.
* new feature: package local nicknames. See manual for details.
* new feature: SB-EXT:MAP-DIRECTORY provides a powerful interface for
directory traversal: it is the backend used by SBCL for CL:DIRECTORY.
* enhancement: easier to use restarts for resolving name-conflicts
resulting from IMPORT, EXPORT, or USE-PACKAGE.
* enhancement: variant DEFPACKAGE forms now signal a full error with
restarts provided for resolving the situation. (lp#891351)
* enhancement: by setting SB-EXT:*ON-PACKAGE-VARIANCE* appropriately variant
DEFPACKAGE forms can now signal a full error with restarts provided for
resolving the situation. See manual for details. (lp#891351)
* enhancement: make-random-state now uses CryptGenRandom as a seed on Windows.
(Thanks to Anton Kovalenko.) (lp#1102748)
* enhancement: backtrace improvements
** secondary CLOS dispatch functions have better debug names (lp#503081)
** easier to read method names in backtraces. See
SB-DEBUG:*METHOD-FRAME-STYLE*.
** SB-DEBUG:PRINT-BACKTRACE and SB-DEBUG:LIST-BACKTRACE are available as
forwards-compatible replacements for SB-DEBUG:BACKTRACE and
SB-DEBUG:BACKTRACE-AS-LIST.
** SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS** has been deprecated, as the same
information is available in less intrusive form as frame annotations.
* enhancement: SB-POSIX now provides MAP-ANON.
* enhancement: test-suite results are colorized, failures in red, unexpected
success in green. Works on Windows and on terminals with ANSI escape code
support. Can be disabled with --no-color.
* optimization: SB-CONCURRENCY:QUEUE implementation is more efficient.
(thanks to James M. Lawrence)
* bug fix: no more unused variable style warnings from RESTART-CASE
macroexpansion (lp#1113859)
* bug fix: no more unused variable style warnings when loading
sb-bsd-sockets.asd (lp#1114681)
* bug fix: deleting a package removes it from implementation-package
lists of other packages.
* bug fix: SB-SPROF:WITH-PROFILING is now usable in the Slime REPL on Darwin.
This does not fix the occasional "interrupt already pending" issue, though.
* bug fix: (setf (documentation 'x 'function)) and
(setf (documentation #'x t)) set documentation in different places.
(regression since 1.0.43.63)
* bug fix: build on newer glibc. (lp#1095036)
changes in sbcl-1.1.4 relative to sbcl-1.1.3:
* optimization: LOOP expressions using "of-type character" have slightly
more efficient expansions.
* bug fix: very long (or infinite) constant lists in DOLIST do not result
in very long compile times or heap exhaustion anymore. (lp#1095488)
* bug fix: `#3(1) is read as #(1 1 1), not as #(1). (lp#1095918)
* bug fix: adjust-array ignored :initial-element for simple-vectors.
(lp#1096359)
* bug fix: optimizations to MAKE-INSTANCE with literal list initargs no
longer cause infinite loops (on circular data) or violate eqlity
constraints. (lp#1099708)
* bug fix: FIRST was not being open coded. (regression from 1.1.0)
changes in sbcl-1.1.3 relative to sbcl-1.1.2:
* enhancement: warnings about bad locale settings, LANG, LC_CTYPE, etc.
(lp#727625)
* enhancement: support for C-c to interrupt the foreground thread
on Windows. (Thanks to Anton Kovalenko.)
* enhancement: STDCALL alien callbacks. (Thanks to Anton Kovalenko.)
* enhancement: Safepoint builds on POSIX platforms can now optionally be
built without pseudo-atomic sequences and their run-time overhead.
* enhancement: Threads created outside of Lisp can enter Lisp through
alien callbacks and appear as Lisp threads for the duration of that
function invocation. On safepoint builds only.
* enhancement: Miscellaneous improvements to namestrings and underlying
calls to OS functions for file system access on Windows. (Thanks to
Anton Kovalenko.)
* enhancement: The MSI installer support for Windows now uses Windows
Installer XML at least version 3.5 and includes various usability
improvements. (Thanks to Dmitry Kalyanov and Anton Kovalenko.)
* enhancement: The sb-bsd-sockets contrib now supports non-blocking-mode
on Windows. (Thanks to Anton Kovalenko.)
* enhancement: The Windows backend now supports the x86-64 platform.
(Thanks to Anton Kovalenko.)
* bug fix: fasls are now once again directly executable (on platforms
supporting shebang lines, with a suitably-installed sbcl).
* bug fix: make.sh --help no longer runs clean.sh. (lp#937001)
* bug fix: Fix CAS access to slots of direct instances of structure classes
in the presence of subclasses sharing the same conc-name.
* bug fix: Logical pathname namestrings on Windows have been changed to
be lower-case, to minimize differences between POSIX and Windows.
Diffstat (limited to 'lang/sbcl')
-rw-r--r-- | lang/sbcl/Makefile | 4 | ||||
-rw-r--r-- | lang/sbcl/distinfo | 9 | ||||
-rw-r--r-- | lang/sbcl/patches/patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8 | 560 |
3 files changed, 567 insertions, 6 deletions
diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile index 3a792be5910..b8781357895 100644 --- a/lang/sbcl/Makefile +++ b/lang/sbcl/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.46 2012/12/08 00:40:00 asau Exp $ +# $NetBSD: Makefile,v 1.47 2013/06/11 19:26:28 asau Exp $ DISTNAME= ${PKGNAME_NOREV}-source -PKGNAME= sbcl-1.1.2 +PKGNAME= sbcl-1.1.8 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sbcl/} EXTRACT_SUFX= .tar.bz2 diff --git a/lang/sbcl/distinfo b/lang/sbcl/distinfo index 8faef471ab3..a197ec2e052 100644 --- a/lang/sbcl/distinfo +++ b/lang/sbcl/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.29 2012/12/08 00:40:01 asau Exp $ +$NetBSD: distinfo,v 1.30 2013/06/11 19:26:28 asau Exp $ -SHA1 (sbcl-1.1.2-source.tar.bz2) = b562c67d689abf8e0dffcd42d11617062ab52633 -RMD160 (sbcl-1.1.2-source.tar.bz2) = 3a785eb0040d4ba12d519a796e9f296a3ee6ee2d -Size (sbcl-1.1.2-source.tar.bz2) = 3692248 bytes +SHA1 (sbcl-1.1.8-source.tar.bz2) = 559b6d0ae455fbf42188b43f8900cba6adb0747f +RMD160 (sbcl-1.1.8-source.tar.bz2) = cc39d5ff7b467e17cfacc3f60265f848a0bad520 +Size (sbcl-1.1.8-source.tar.bz2) = 4108784 bytes SHA1 (patch-ab) = 52753efa24fc03e5604f6cb4ef2a7bbd3f40b6a6 SHA1 (patch-ad) = 4a10e7d498b686a09b067c527010981c15f0f8c8 SHA1 (patch-ae) = da24df72525afdee0433d557bf4ebb764fee1d24 +SHA1 (patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8) = b27a9dc6adf425b35456f1b2b5d8fffd7e026db9 diff --git a/lang/sbcl/patches/patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8 b/lang/sbcl/patches/patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8 new file mode 100644 index 00000000000..41e59404005 --- /dev/null +++ b/lang/sbcl/patches/patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8 @@ -0,0 +1,560 @@ +$NetBSD: patch-revert-37d3828773e2f847bb1ed7522b0af4fb8e736fc8,v 1.1 2013/06/11 19:26:28 asau Exp $ + +Revert revision 37d3828773e2f847bb1ed7522b0af4fb8e736fc8 +which breaks build on NetBSD. + +diff --git a/contrib/sb-sprof/Makefile contrib/sb-sprof/Makefile +index 7373c72..463ae52 100644 +--- contrib/sb-sprof/Makefile ++++ contrib/sb-sprof/Makefile +@@ -2,4 +2,4 @@ MODULE=sb-sprof + include ../vanilla-module.mk + + test:: +- $(SBCL) --eval '(load (format nil "SYS:CONTRIB;~:@(~A~);TEST.LISP" "$(MODULE)"))' </dev/null ++ true +diff --git contrib/sb-sprof/sb-sprof.lisp contrib/sb-sprof/sb-sprof.lisp +index 0d81649..775924a 100644 +--- contrib/sb-sprof/sb-sprof.lisp ++++ contrib/sb-sprof/sb-sprof.lisp +@@ -792,9 +792,7 @@ The following keyword args are recognized: + :mode mode)) + (enable-call-counting) + (setf *profiled-threads* threads) +- (sb-sys:enable-interrupt sb-unix:sigprof +- #'sigprof-handler +- :synchronous t) ++ (sb-sys:enable-interrupt sb-unix:sigprof #'sigprof-handler) + (ecase mode + (:alloc + (let ((alloc-signal (1- alloc-interval))) +@@ -1407,23 +1405,6 @@ functions during statistical profiling." + (with-profiling (:reset t :max-samples 1000 :report :graph) + (test-0 7))) + +-(defun consalot () +- (let ((junk '())) +- (loop repeat 10000 do +- (push (make-array 10) junk)) +- junk)) +- +-(defun consing-test () +- ;; 0.0001 chosen so that it breaks rather reliably when sprof does not +- ;; respect pseudo atomic. +- (with-profiling (:reset t :sample-interval 0.0001 :report :graph :loop nil) +- (let ((target (+ (get-universal-time) 15))) +- (princ #\.) +- (force-output) +- (loop +- while (< (get-universal-time) target) +- do (consalot))))) +- + + ;;; provision + (provide 'sb-sprof) +diff --git make-config.sh make-config.sh +index 6b720e0..1a0a547 100644 +--- make-config.sh ++++ make-config.sh +@@ -544,7 +544,6 @@ case "$sbcl_os" in + # roughly-equivalent magic nevertheless:) + printf ' :sb-dynamic-core :os-provides-dlopen' >> $ltf + printf ' :sb-thread :sb-safepoint :sb-thruption :sb-wtimer' >> $ltf +- printf ' :sb-safepoint-strictly' >> $ltf + # + link_or_copy Config.$sbcl_arch-win32 Config + link_or_copy $sbcl_arch-win32-os.h target-arch-os.h +diff --git package-data-list.lisp-expr package-data-list.lisp-expr +index 691a040..03ab6ee 100644 +--- package-data-list.lisp-expr ++++ package-data-list.lisp-expr +@@ -2023,8 +2023,6 @@ is a good idea, but see SB-SYS re. blurring of boundaries." + "THREAD-NAME" + "THREAD-YIELD" + "FOREIGN-THREAD" +- #!+(and sb-safepoint-strictly (not win32)) +- "SIGNAL-HANDLING-THREAD" + ;; Memory barrier + "BARRIER" + ;; Mutexes +diff --git src/code/target-signal.lisp src/code/target-signal.lisp +index 3fd22f3..9fab9d1 100644 +--- src/code/target-signal.lisp ++++ src/code/target-signal.lisp +@@ -117,25 +117,11 @@ + (sb!alien:define-alien-routine ("install_handler" install-handler) + sb!alien:unsigned-long + (signal sb!alien:int) +- (handler sb!alien:unsigned-long) +- (synchronous boolean)) ++ (handler sb!alien:unsigned-long)) + + ;;;; interface to enabling and disabling signal handlers + +-;;; Note on the SYNCHRONOUS argument: On builds without pseudo-atomic, +-;;; we have no way of knowing whether interrupted code was in an +-;;; allocation sequence, and cannot delay signals until after +-;;; allocation. Any signal that can occur asynchronously must be +-;;; considered unsafe for immediate execution, and the invocation of its +-;;; lisp handler will get delayed into a newly spawned signal handler +-;;; thread. However, there are signals which we must handle +-;;; immediately, because they occur synchonously (hence the boolean flag +-;;; SYNCHRONOUS to this function), luckily implying that the signal +-;;; happens only in specific places (illegal instructions, floating +-;;; point instructions, certain system calls), hopefully ruling out the +-;;; possibility that we would trigger it during allocation. +- +-(defun enable-interrupt (signal handler &key synchronous) ++(defun enable-interrupt (signal handler) + (declare (type (or function fixnum (member :default :ignore)) handler)) + (/show0 "enable-interrupt") + (flet ((run-handler (&rest args) +@@ -149,8 +135,7 @@ + (:ignore sig-ign) + (t + (sb!kernel:get-lisp-obj-address +- #'run-handler))) +- synchronous))) ++ #'run-handler)))))) + (cond ((= result sig-dfl) :default) + ((= result sig-ign) :ignore) + (t (the (or function fixnum) +@@ -162,26 +147,6 @@ + (defun ignore-interrupt (signal) + (enable-interrupt signal :ignore)) + +-;;;; Support for signal handlers which aren't. +-;;;; +-;;;; On safepoint builds, user-defined Lisp signal handlers do not run +-;;;; in the handler for their signal, because we have no pseudo atomic +-;;;; mechanism to prevent handlers from hitting during allocation. +-;;;; Rather, the signal spawns off a fresh native thread, which calls +-;;;; into lisp with a fake context through this callback: +- +-#!+(and sb-safepoint-strictly (not win32)) +-(defun signal-handler-callback (run-handler signal args) +- (sb!thread::initial-thread-function-trampoline +- (sb!thread::make-signal-handling-thread :name "signal handler" +- :signal-number signal) +- nil (lambda () +- (let* ((info (sb!sys:sap-ref-sap args 0)) +- (context (sb!sys:sap-ref-sap args sb!vm:n-word-bytes))) +- (funcall run-handler signal info context))) +- nil nil nil nil)) +- +- + ;;;; default LISP signal handlers + ;;;; + ;;;; Most of these just call ERROR to report the presence of the signal. +@@ -272,13 +237,13 @@ + "Enable all the default signals that Lisp knows how to deal with." + (enable-interrupt sigint #'sigint-handler) + (enable-interrupt sigterm #'sigterm-handler) +- (enable-interrupt sigill #'sigill-handler :synchronous t) ++ (enable-interrupt sigill #'sigill-handler) + #!-linux + (enable-interrupt sigemt #'sigemt-handler) +- (enable-interrupt sigfpe #'sb!vm:sigfpe-handler :synchronous t) +- (enable-interrupt sigbus #'sigbus-handler :synchronous t) ++ (enable-interrupt sigfpe #'sb!vm:sigfpe-handler) ++ (enable-interrupt sigbus #'sigbus-handler) + #!-linux +- (enable-interrupt sigsys #'sigsys-handler :synchronous t) ++ (enable-interrupt sigsys #'sigsys-handler) + #!-sb-wtimer + (enable-interrupt sigalrm #'sigalrm-handler) + #!-sb-thruption +diff --git src/code/thread.lisp src/code/thread.lisp +index 3d1ecd4..2cfd567 100644 +--- src/code/thread.lisp ++++ src/code/thread.lisp +@@ -42,14 +42,6 @@ in future versions." + "Type of native threads which are attached to the runtime as Lisp threads + temporarily.") + +-#!+(and sb-safepoint-strictly (not win32)) +-(def!struct (signal-handling-thread +- (:include foreign-thread) +- (:conc-name "THREAD-")) +- #!+sb-doc +- "Asynchronous signal handling thread." +- (signal-number nil :type integer)) +- + (def!struct mutex + #!+sb-doc + "Mutex type." +diff --git src/compiler/generic/objdef.lisp src/compiler/generic/objdef.lisp +index 262f472..fda2758 100644 +--- src/compiler/generic/objdef.lisp ++++ src/compiler/generic/objdef.lisp +@@ -434,8 +434,6 @@ + #!+sb-safepoint (csp-around-foreign-call :c-type "lispobj *") + #!+sb-safepoint (pc-around-foreign-call :c-type "lispobj *") + #!+win32 (synchronous-io-handle-and-flag :c-type "HANDLE" :length 1) +- #!+(and sb-safepoint-strictly (not win32)) +- (sprof-alloc-region :c-type "struct alloc_region" :length 5) + ;; KLUDGE: On alpha, until STEPPING we have been lucky and the 32 + ;; bit slots came in pairs. However the C compiler will align + ;; interrupt_contexts on a double word boundary. This logic should +diff --git src/compiler/generic/parms.lisp src/compiler/generic/parms.lisp +index 4661321..ca556c2 100644 +--- src/compiler/generic/parms.lisp ++++ src/compiler/generic/parms.lisp +@@ -124,9 +124,7 @@ + fdefinition-object + #!+win32 sb!kernel::handle-win32-exception + #!+sb-thruption sb!thread::run-interruption +- #!+sb-safepoint sb!thread::enter-foreign-callback +- #!+(and sb-safepoint-strictly (not win32)) +- sb!unix::signal-handler-callback)) ++ #!+sb-safepoint sb!thread::enter-foreign-callback)) + + (defparameter *common-static-symbols* + '(t +diff --git src/compiler/ppc/macros.lisp src/compiler/ppc/macros.lisp +index 262cc10..2fdfb7e 100644 +--- src/compiler/ppc/macros.lisp ++++ src/compiler/ppc/macros.lisp +@@ -336,9 +336,6 @@ + ;;; trap if ALLOC-TN's negative (handling the deferred interrupt) and + ;;; using FLAG-TN - minus the large constant - to correct ALLOC-TN. + (defmacro pseudo-atomic ((flag-tn) &body forms) +- #!+sb-safepoint-strictly +- `(progn ,flag-tn ,@forms (emit-safepoint)) +- #!-sb-safepoint-strictly + `(progn + (without-scheduling () + ;; Extra debugging stuff: +diff --git src/compiler/x86-64/macros.lisp src/compiler/x86-64/macros.lisp +index a397573..11a06fc 100644 +--- src/compiler/x86-64/macros.lisp ++++ src/compiler/x86-64/macros.lisp +@@ -303,9 +303,9 @@ + + #!+sb-thread + (defmacro pseudo-atomic (&rest forms) +- #!+sb-safepoint-strictly ++ #!+win32 + `(progn ,@forms (emit-safepoint)) +- #!-sb-safepoint-strictly ++ #!-win32 + (with-unique-names (label) + `(let ((,label (gen-label))) + (inst mov (make-ea :qword +diff --git src/compiler/x86/macros.lisp src/compiler/x86/macros.lisp +index 4050640..d7b6bc2 100644 +--- src/compiler/x86/macros.lisp ++++ src/compiler/x86/macros.lisp +@@ -408,9 +408,9 @@ + + #!+sb-thread + (defmacro pseudo-atomic (&rest forms) +- #!+sb-safepoint-strictly ++ #!+win32 + `(progn ,@forms (emit-safepoint)) +- #!-sb-safepoint-strictly ++ #!-win32 + (with-unique-names (label) + `(let ((,label (gen-label))) + (inst mov (make-ea :dword :disp (* 4 thread-pseudo-atomic-bits-slot)) +diff --git src/runtime/gencgc.c src/runtime/gencgc.c +index f4ffd2f..5829b5a 100644 +--- src/runtime/gencgc.c ++++ src/runtime/gencgc.c +@@ -4306,7 +4306,9 @@ general_alloc(sword_t nbytes, int page_type_flag) + lispobj AMD64_SYSV_ABI * + alloc(long nbytes) + { +-#ifdef LISP_FEATURE_SB_SAFEPOINT_STRICTLY ++#ifdef LISP_FEATURE_WIN32 ++ /* WIN32 is currently the only platform where inline allocation is ++ * not pseudo atomic. */ + struct thread *self = arch_os_get_current_thread(); + int was_pseudo_atomic = get_pseudo_atomic_atomic(self); + if (!was_pseudo_atomic) +@@ -4317,7 +4319,7 @@ alloc(long nbytes) + + lispobj *result = general_alloc(nbytes, BOXED_PAGE_FLAG); + +-#ifdef LISP_FEATURE_SB_SAFEPOINT_STRICTLY ++#ifdef LISP_FEATURE_WIN32 + if (!was_pseudo_atomic) + clear_pseudo_atomic_atomic(self); + #endif +@@ -4432,12 +4434,8 @@ void gc_alloc_update_all_page_tables(void) + { + /* Flush the alloc regions updating the tables. */ + struct thread *th; +- for_each_thread(th) { ++ for_each_thread(th) + gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->alloc_region); +-#if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->sprof_alloc_region); +-#endif +- } + gc_alloc_update_page_tables(UNBOXED_PAGE_FLAG, &unboxed_region); + gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &boxed_region); + } +diff --git src/runtime/interrupt.c src/runtime/interrupt.c +index 882e2bb..d23dbd7 100644 +--- src/runtime/interrupt.c ++++ src/runtime/interrupt.c +@@ -1779,89 +1779,6 @@ see_if_sigaction_nodefer_works(void) + #undef SA_NODEFER_TEST_BLOCK_SIGNAL + #undef SA_NODEFER_TEST_KILL_SIGNAL + +-#if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- +-static void * +-signal_thread_trampoline(void *pthread_arg) +-{ +- int signo = (int) pthread_arg; +- os_context_t fake_context; +- siginfo_t fake_info; +-#ifdef LISP_FEATURE_PPC +- mcontext_t uc_regs; +-#endif +- +- memset(&fake_info, 0, sizeof(fake_info)); +- memset(&fake_context, 0, sizeof(fake_context)); +-#ifdef LISP_FEATURE_PPC +- memset(&uc_regs, 0, sizeof(uc_regs)); +- fake_context.uc_mcontext.uc_regs = &uc_regs; +-#endif +- +- *os_context_pc_addr(&fake_context) = &signal_thread_trampoline; +-#ifdef ARCH_HAS_STACK_POINTER /* aka x86(-64) */ +- *os_context_sp_addr(&fake_context) = __builtin_frame_address(0); +-#endif +- +- signal_handler_callback(interrupt_handlers[signo].lisp, +- signo, &fake_info, &fake_context); +- return 0; +-} +- +-static void +-sigprof_handler_trampoline(int signal, siginfo_t *info, void *void_context) +-{ +- SAVE_ERRNO(signal,context,void_context); +- struct thread *self = arch_os_get_current_thread(); +- +- /* alloc() is not re-entrant and still uses pseudo atomic (even though +- * inline allocation does not). In this case, give up. */ +- if (get_pseudo_atomic_atomic(self)) +- goto cleanup; +- +- struct alloc_region tmp = self->alloc_region; +- self->alloc_region = self->sprof_alloc_region; +- self->sprof_alloc_region = tmp; +- +- interrupt_handle_now_handler(signal, info, void_context); +- +- /* And we're back. We know that the SIGPROF handler never unwinds +- * non-locally, and can simply swap things back: */ +- +- tmp = self->alloc_region; +- self->alloc_region = self->sprof_alloc_region; +- self->sprof_alloc_region = tmp; +- +-cleanup: +- ; /* Dear C compiler, it's OK to have a label here. */ +- RESTORE_ERRNO; +-} +- +-static void +-spawn_signal_thread_handler(int signal, siginfo_t *info, void *void_context) +-{ +- SAVE_ERRNO(signal,context,void_context); +- +- pthread_attr_t attr; +- pthread_t th; +- +- if (pthread_attr_init(&attr)) +- goto lost; +- if (pthread_attr_setstacksize(&attr, thread_control_stack_size)) +- goto lost; +- if (pthread_create(&th, &attr, &signal_thread_trampoline, (void*) signal)) +- goto lost; +- if (pthread_attr_destroy(&attr)) +- goto lost; +- +- RESTORE_ERRNO; +- return; +- +-lost: +- lose("spawn_signal_thread_handler"); +-} +-#endif +- + static void + unblock_me_trampoline(int signal, siginfo_t *info, void *void_context) + { +@@ -1946,8 +1863,7 @@ undoably_install_low_level_interrupt_handler (int signal, + + /* This is called from Lisp. */ + uword_t +-install_handler(int signal, void handler(int, siginfo_t*, os_context_t*), +- int synchronous) ++install_handler(int signal, void handler(int, siginfo_t*, os_context_t*)) + { + #ifndef LISP_FEATURE_WIN32 + struct sigaction sa; +@@ -1964,12 +1880,6 @@ install_handler(int signal, void handler(int, siginfo_t*, os_context_t*), + if (ARE_SAME_HANDLER(handler, SIG_DFL) || + ARE_SAME_HANDLER(handler, SIG_IGN)) + sa.sa_sigaction = (void (*)(int, siginfo_t*, void*))handler; +-#ifdef LISP_FEATURE_SB_SAFEPOINT_STRICTLY +- else if (signal == SIGPROF) +- sa.sa_sigaction = sigprof_handler_trampoline; +- else if (!synchronous) +- sa.sa_sigaction = spawn_signal_thread_handler; +-#endif + else if (sigismember(&deferrable_sigset, signal)) + sa.sa_sigaction = maybe_now_maybe_later; + else if (!sigaction_nodefer_works && +diff --git src/runtime/interrupt.h src/runtime/interrupt.h +index 07b4a2d..a27eb08 100644 +--- src/runtime/interrupt.h ++++ src/runtime/interrupt.h +@@ -158,8 +158,7 @@ extern void undoably_install_low_level_interrupt_handler ( + int signal, + interrupt_handler_t handler); + extern uword_t install_handler(int signal, +- interrupt_handler_t handler, +- int synchronous); ++ interrupt_handler_t handler); + + extern union interrupt_handler interrupt_handlers[NSIG]; + +diff --git src/runtime/runtime.c src/runtime/runtime.c +index 49c007b..3bc18ee 100644 +--- src/runtime/runtime.c ++++ src/runtime/runtime.c +@@ -95,7 +95,7 @@ void + sigint_init(void) + { + SHOW("entering sigint_init()"); +- install_handler(SIGINT, sigint_handler, 1); ++ install_handler(SIGINT, sigint_handler); + SHOW("leaving sigint_init()"); + } + +diff --git src/runtime/safepoint.c src/runtime/safepoint.c +index 45af50e..a9e578c 100644 +--- src/runtime/safepoint.c ++++ src/runtime/safepoint.c +@@ -966,26 +966,6 @@ handle_safepoint_violation(os_context_t *ctx, os_vm_address_t fault_address) + } + #endif /* LISP_FEATURE_WIN32 */ + +-#if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +-void +-signal_handler_callback(lispobj run_handler, int signo, void *info, void *ctx) +-{ +- init_thread_data scribble; +- void *args[2]; +- args[0] = info; +- args[1] = ctx; +- +- attach_os_thread(&scribble); +- +- odxprint(misc, "callback from signal handler thread for: %d\n", signo); +- funcall3(StaticSymbolFunction(SIGNAL_HANDLER_CALLBACK), +- run_handler, make_fixnum(signo), alloc_sap(args)); +- +- detach_os_thread(&scribble); +- return; +-} +-#endif +- + void + callback_wrapper_trampoline( + #if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) +diff --git src/runtime/thread.c src/runtime/thread.c +index 46f8f7d..4d20d0f 100644 +--- src/runtime/thread.c ++++ src/runtime/thread.c +@@ -401,9 +401,6 @@ undo_init_new_thread(struct thread *th, init_thread_data *scribble) + #ifdef LISP_FEATURE_SB_SAFEPOINT + block_blockable_signals(0, 0); + gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->alloc_region); +-#if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->sprof_alloc_region); +-#endif + pop_gcing_safety(&scribble->safety); + lock_ret = pthread_mutex_lock(&all_threads_lock); + gc_assert(lock_ret == 0); +@@ -421,9 +418,6 @@ undo_init_new_thread(struct thread *th, init_thread_data *scribble) + gc_assert(lock_ret == 0); + + gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->alloc_region); +-#if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- gc_alloc_update_page_tables(BOXED_PAGE_FLAG, &th->sprof_alloc_region); +-#endif + unlink_thread(th); + pthread_mutex_unlock(&all_threads_lock); + gc_assert(lock_ret == 0); +@@ -706,9 +700,6 @@ create_thread_struct(lispobj initial_function) { + #endif + #ifdef LISP_FEATURE_GENCGC + gc_set_region_empty(&th->alloc_region); +-# if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- gc_set_region_empty(&th->sprof_alloc_region); +-# endif + #endif + #ifdef LISP_FEATURE_SB_THREAD + /* This parallels the same logic in globals.c for the +diff --git src/runtime/thread.h src/runtime/thread.h +index 1a004c0..8bde9ba 100644 +--- src/runtime/thread.h ++++ src/runtime/thread.h +@@ -422,11 +422,6 @@ int check_pending_thruptions(os_context_t *ctx); + void attach_os_thread(init_thread_data *); + void detach_os_thread(init_thread_data *); + +-# if defined(LISP_FEATURE_SB_SAFEPOINT_STRICTLY) && !defined(LISP_FEATURE_WIN32) +- +-void signal_handler_callback(lispobj, int, void *, void *); +-# endif +- + #endif + + extern void create_initial_thread(lispobj); +diff --git tests/signals.impure.lisp tests/signals.impure.lisp +index c4f347e..716580c 100644 +--- tests/signals.impure.lisp ++++ tests/signals.impure.lisp +@@ -70,15 +70,9 @@ + :skipped-on :win32) + (assert (eq :condition + (handler-case +- (progn +- (sb-thread::kill-safely +- (sb-thread::thread-os-thread sb-thread::*current-thread*) +- sb-unix:sigint) +- #+sb-safepoint-strictly +- ;; In this case, the signals handler gets invoked +- ;; indirectly through an INTERRUPT-THREAD. Give it +- ;; enough time to hit. +- (sleep 1)) ++ (sb-thread::kill-safely ++ (sb-thread::thread-os-thread sb-thread::*current-thread*) ++ sb-unix:sigint) + (sb-sys:interactive-interrupt () + :condition))))) + +diff --git tests/test-util.lisp tests/test-util.lisp +index 20b2c54..1d44174 100644 +--- tests/test-util.lisp ++++ tests/test-util.lisp +@@ -69,10 +69,6 @@ + (setf ,threads (union (union *threads-to-kill* + *threads-to-join*) + ,threads)) +- #+(and sb-safepoint-strictly (not win32)) +- (dolist (thread (sb-thread:list-all-threads)) +- (when (typep thread 'sb-thread:signal-handling-thread) +- (ignore-errors (sb-thread:join-thread thread)))) + (dolist (thread (sb-thread:list-all-threads)) + (unless (or (not (sb-thread:thread-alive-p thread)) + (eql thread sb-thread:*current-thread*) |