Nikodemus Siivola [Mon, 5 Dec 2011 09:25:51 +0000 (11:25 +0200)]
oops. actually stop when seeing --with-foo and customize-target-features.lisp
...instead of just complaining to the stdout.
Nikodemus Siivola [Mon, 28 Nov 2011 17:45:16 +0000 (19:45 +0200)]
more robust deadlock detection
Lock around building the deadlock chain using WITH-CAS-LOCK after the
tentative deadlock has been detected, and break the deadlock chain before
signaling the error.
This means that a single deadlock is reported only in a single thread.
Fixes occasional failures of deadlock-detection.1 due to a bogus vicious
metacircle. (Two threads detecting the same deadlock, then racing to report
the error detected as another deadlock, the reporting of which in turn looked
like a metacircle to CLOS if PRINT-OBJECT didn't yet have the right method in
cache.)
Nikodemus Siivola [Wed, 8 Jun 2011 12:22:46 +0000 (15:22 +0300)]
build runtime/TAGS by default
Getting tired of needing to build it manually all the time.
Nikodemus Siivola [Fri, 2 Dec 2011 12:25:47 +0000 (14:25 +0200)]
add --fancy option to make.sh
Enables threads, core compression, xref for internals, and
after-xc-core. (The last one for convenience, even though it's not user
visible.)
Nikodemus Siivola [Thu, 1 Dec 2011 17:33:14 +0000 (19:33 +0200)]
add --with-<feature> and --without-<feature> support to make.sh
customize-target-features.lisp still works, but the system refuses to mix it
with --with[out] options to avoid confusion.
Nikodemus Siivola [Wed, 30 Nov 2011 16:55:04 +0000 (18:55 +0200)]
add --arch option to make.sh
Not for full-blown cross compilation, though.
Nikodemus Siivola [Sun, 4 Dec 2011 08:32:47 +0000 (10:32 +0200)]
make make.sh run clean.sh
Since eg. trying to build for different arches without cleaning
in the middle will just break things.
slam.sh is for those in a hurry.
Juho Snellman [Sun, 4 Dec 2011 23:09:00 +0000 (00:09 +0100)]
1.0.54: will be tagged as "sbcl-1.0.54"
Juho Snellman [Sun, 4 Dec 2011 19:42:04 +0000 (20:42 +0100)]
:backtrace-interrupted-condition-wait fails on x86 Linux
Nikodemus Siivola [Fri, 2 Dec 2011 22:23:12 +0000 (00:23 +0200)]
remove a stray debugging PRINT
...there since 1.0.48.21! Wow.
Nikodemus Siivola [Thu, 1 Dec 2011 09:16:09 +0000 (11:16 +0200)]
fix bug in semaphore notification objects on TRY-SEMAPHORE
It's not notifiction.
Stas Boukarev [Thu, 1 Dec 2011 14:34:37 +0000 (18:34 +0400)]
Fix clos.impure.lisp DOCUMENTATION test on #-sb-doc.
Don't rely on docstrings being present on standard functions
when testing DOCUMENTATION.
Alastair Bridgewater [Wed, 30 Nov 2011 16:35:32 +0000 (11:35 -0500)]
tests: Skip stream.impure.lisp / BUG-657183 on non-unicode.
* For some reason, #\GREEK_SMALL_LETTER_LAMDA isn't a valid
character name on non-unicode builds. Who knew?
Joshua Elsasser [Wed, 30 Nov 2011 05:29:58 +0000 (21:29 -0800)]
Oops, remove a debugging printenv which snuck in.
Joshua Elsasser [Tue, 29 Nov 2011 17:18:00 +0000 (09:18 -0800)]
Work around excessive consing via ROOM by turning off
alien-funcall-saves-fp-and-pc.
Nikodemus Siivola [Mon, 28 Nov 2011 10:41:52 +0000 (12:41 +0200)]
try to robustify test for bug-309448
We've been getting intermittent reports of it failing, but I've been unable
to reproduce so far. The test in question is a compiler scaling test, which
compares times it takes to compile different things. Brittle, indeed.
Other than non-SBCL causes the only thing I can think of right now is GCs
from other tests getting accounted against one of the supposed-to-be-fast
runs. So, run GC :FULL T before getting the timings to make things more
consistent.
Nikodemus Siivola [Mon, 28 Nov 2011 16:00:02 +0000 (18:00 +0200)]
gencgc: fix regression from
137ba2db2d362f03754ccd080ddbe96f7e3c5dc7
Turned loop conditions into asserts in faith that they always hold.
Turns out this is not the case after all.
Nikodemus Siivola [Mon, 28 Nov 2011 12:18:12 +0000 (14:18 +0200)]
update ASDF to 2.019
Nikodemus Siivola [Mon, 28 Nov 2011 10:19:19 +0000 (12:19 +0200)]
NEWS prettification
Wrap to 78, upcase symbol names, move one more item under the "GC-related"
section and use more consistent phrasing there.
Nikodemus Siivola [Sun, 27 Nov 2011 14:53:20 +0000 (16:53 +0200)]
tweak NAME-CONTEXT
On platforms without UNWIND-TO-FRAME-AND-CALL vops we introduce an extra
block, which then shows up there in the function names for eg. lambdas
defined at the toplevel in high debug code. Fix that.
CATCH also introduces a block. Filter those out too.
Nikodemus Siivola [Sun, 27 Nov 2011 13:04:00 +0000 (05:04 -0800)]
make PPC/Linux buildable on ppc64 hosts
Nikodemus Siivola [Sun, 27 Nov 2011 13:24:42 +0000 (05:24 -0800)]
fix unthreaded builds with sb-futex in target *features*
Nikodemus Siivola [Sun, 27 Nov 2011 12:26:37 +0000 (14:26 +0200)]
missing NEWS
Nikodemus Siivola [Sun, 27 Nov 2011 12:23:35 +0000 (14:23 +0200)]
refactor PRINT-NOT-READABLE condition signaling
SB-INT:PRINT-NOT-READABLE-ERROR both signals the condition,
and binds the restarts.
Nikodemus Siivola [Sun, 27 Nov 2011 12:19:59 +0000 (14:19 +0200)]
we have read-evaluated-form, kill read-replacement-character and -string
...and fix read-evaluated-form to flush its output.
Nikodemus Siivola [Wed, 23 Nov 2011 18:27:38 +0000 (20:27 +0200)]
marginally prettier native debugger banner
Add a conditional newline before printing the thread object.
Nikodemus Siivola [Fri, 25 Nov 2011 16:09:49 +0000 (18:09 +0200)]
cleanup: refactor copy_large_unboxed_object and copy_large_object
They're virtually identical. Implement both in terms of a new function,
general_copy_large_object.
gc_quick_alloc_large and gc_quick_alloc_large_unboxed become unused, delete
them.
...and sort out the types while at it. (long still in the interface)
Nikodemus Siivola [Fri, 25 Nov 2011 15:23:12 +0000 (17:23 +0200)]
cleanup: pacify GCC with an extra pair of parens
Meh. What a stupid warning.
Nikodemus Siivola [Fri, 25 Nov 2011 15:19:29 +0000 (17:19 +0200)]
cleanup: use OS_VM_SIZE_FMT in collect_garbage
One warning less on 32-bit builds.
Nikodemus Siivola [Fri, 25 Nov 2011 14:57:13 +0000 (16:57 +0200)]
cleanup: types in load_core_file
Don't abuse lispobj for things which aren't. Instead new type word_t for
"random binary gunk" in unsigned word-sized slices.
Also define WORD_FMTX.
Nikodemus Siivola [Fri, 25 Nov 2011 14:35:18 +0000 (16:35 +0200)]
cleanup: os_vm_size_t for large_object_size
Nikodemus Siivola [Fri, 25 Nov 2011 14:34:05 +0000 (16:34 +0200)]
cleanup: types in gc_alloc_large
Still keeping the long in the interface.
Nikodemus Siivola [Fri, 25 Nov 2011 14:31:17 +0000 (16:31 +0200)]
cleanup: types in gc_alloc_update_page_tables
Nikodemus Siivola [Fri, 25 Nov 2011 14:30:17 +0000 (16:30 +0200)]
cleanup: void_diff returns os_vm_size_t
Nikodemus Siivola [Fri, 25 Nov 2011 12:55:45 +0000 (14:55 +0200)]
cleanup: os_vm_size_t in gc_alloc_new_region
Same as before, long remains in the interface for a while yet.
Nikodemus Siivola [Fri, 25 Nov 2011 12:53:22 +0000 (14:53 +0200)]
cleanup: #define and use OS_VM_SIZE_FMT in write_generation_stats
Nikodemus Siivola [Fri, 25 Nov 2011 14:24:35 +0000 (16:24 +0200)]
cleanup: unused variable in gc_free_heap
Nikodemus Siivola [Fri, 25 Nov 2011 12:52:39 +0000 (14:52 +0200)]
cleanup: use os_vm_size_t in gc_find_freeish_pages and for granularity
long remains in the signature for now, getting to it soon.
Nikodemus Siivola [Fri, 25 Nov 2011 12:42:49 +0000 (14:42 +0200)]
cleanup: use os_vm_size_t in count_generation_bytes_allocated
Nikodemus Siivola [Fri, 25 Nov 2011 12:40:43 +0000 (14:40 +0200)]
cleanup: use os_vm_size_t in npage_bytes
Nikodemus Siivola [Fri, 25 Nov 2011 12:39:25 +0000 (14:39 +0200)]
cleanup: struct page member types
.region_start_offset is os_vm_size_t
.bytes_used is page_bytes_t (new typedef)
Also add a compile-time check to guard against GENCGC_CARD_BYTES greater
than UINT_MAX.
Nikodemus Siivola [Thu, 24 Nov 2011 15:47:58 +0000 (17:47 +0200)]
cleanup: page_index_t canonicalization
Also define PAGE_INDEX_FTM.
After this I /think/ everything that should be page_index_t, is.
NOTE FOR OUR NEW TYPEDEF OVERLORDS: page_index_t itself is still signed
long, which is probably wrong for Win64.
Alastair Bridgewater [Fri, 11 Nov 2011 14:00:46 +0000 (09:00 -0500)]
Don't scrub the C stack from C.
* The C version of the stack scrubber was picking an address to
start scrubbing by taking the address of a variable in the current
stack frame and subtracting one, clearly dependent on the frame
layout supplied by the compiler.
* Fix, by rewriting the stack scrubber in assembly when
LISP_FEATURE_C_STACK_IS_CONTROL_STACK. This way, we know what the
stack frame layout is, and don't have to worry about red zones and
other such compiler-dependent noise.
* Lightly tested on linux/x86, linux/x86-64, darwin/x86, and
darwin/x86-64.
Lutz Euler [Wed, 23 Nov 2011 19:31:09 +0000 (20:31 +0100)]
Tighter floating-point type constraints in some cases
CONSTRAIN-FLOAT-TYPE used to return a closed bound in some cases where
the corresponding (tighter) open bound would have been derivable,
leading to missed optimisation opportunities. For example the compiler
did not derive that x is not zero in the following call to LOG:
(defun foo (x)
(declare (type (single-float 0.0) x))
(when (> x 0.0)
(log x)))
Fix CONSTRAIN-FLOAT-TYPE so that it returns the tightest possible result
in all cases.
See lp#894498 for details.
Alastair Bridgewater [Wed, 23 Nov 2011 15:55:51 +0000 (10:55 -0500)]
Reduce random casting in looks_like_valid_lisp_pointer_p().
* The casts are ugly, and obscure the logic.
* The casts are WRONG on systems with 64-bit pointers and 32-bit
long integers (thanks to akovalenko for pointing this out).
* We already have utility functions to do most-to-all of what
we're doing with casts.
* And we never use one of our (lispobj *) parameters as an actual
pointer, we always cast it all over the place instead.
* So, take a lispobj instead of a (lispobj *), and use utility
functions from runtime.h instead of inline casting and random
pointer arithmetic.
Nikodemus Siivola [Sun, 23 Oct 2011 09:37:42 +0000 (12:37 +0300)]
tweak tail merging logic
TAIL-ANNOTATE used MERGE-TAIL-CALLS policy (which is an integer) as a
boolean, instead of comparing it to zero. Oops. This means that we always did
TCO when possible.
Since adding a debug-catch-tag effectively prevents TCO, and the policy
controlling that looks just like what we would like to have in
MERGE-TAIL-CALLS if TAIL-ANNOTATE were to use it correctly... just deprecate
MERGE-TAIL-CALLS instead.
Joshua Elsasser [Wed, 23 Nov 2011 07:29:13 +0000 (23:29 -0800)]
Insure that the test for bug 881445 runs with a large enough dynamic space.
Joshua Elsasser [Wed, 23 Nov 2011 02:02:50 +0000 (18:02 -0800)]
Fix build with non-SBCL host.
Joshua Elsasser [Wed, 23 Nov 2011 01:20:49 +0000 (17:20 -0800)]
Skip a known failure on openbsd.
Joshua Elsasser [Wed, 23 Nov 2011 01:15:03 +0000 (17:15 -0800)]
Avoid a reader error in threads.pure.lisp with non-threaded sbcl.
Joshua Elsasser [Mon, 17 Oct 2011 01:12:53 +0000 (18:12 -0700)]
Fix errno value for sb-posix rmdir.error.3 test on OpenBSD.
Use #+bsd instead of #+(or darwin openbsd) on the assumption that all
the other BSD-derived systems use the same errno value.
Alastair Bridgewater [Tue, 22 Nov 2011 18:44:06 +0000 (13:44 -0500)]
Fix symbol-value-in-thread GC race condition.
* SVIT was using SAP-REF-WORD and MAKE-LISP-OBJ while the GC was
enabled, which is mostly-safe on x86oids, but technically breaks
the consistency rules for the GC. Failures due to badly-timed GC
(well-timed GC?) have been observed on PPC.
* Instead of SAP-REF-WORD, checking for specific tags, then
using MAKE-LISP-OBJ and checking for validity and GC epoch, which
is a badly-broken approach, use SAP-REF-LISPOBJ to obtain the
value and then check the tags with GET-LISP-OBJ-ADDRESS, a far
safer approach, with lower overhead, and not subject to random GC
lossage.
Alastair Bridgewater [Tue, 22 Nov 2011 18:40:21 +0000 (13:40 -0500)]
Add SB-SYS:SAP-REF-LISPOBJ.
* This is for those cases where you know that you are trying to
read valid boxed data, the address of the data you want to read
is in some sense "stable" (meaning, won't be moved by the GC),
and you don't want to deal with the requirements for calling
SB-KERNEL:MAKE-LISP-OBJ.
* Implemented across the board, but only tested on PPC. What
could possibly go wrong?
Alastair Bridgewater [Tue, 22 Nov 2011 15:57:55 +0000 (10:57 -0500)]
debug-int: Explain why and how SB-KERNEL:MAKE-LISP-OBJ is GC-unsafe.
* Just adding some commentary.
Alastair Bridgewater [Tue, 22 Nov 2011 15:32:56 +0000 (10:32 -0500)]
linux: Enable :SB-FUTEX by default on PPC.
* Prior to the great de-lutexification, we used futexes on
threaded Linux/PPC. Not having them enabled on PPC was an
oversight, but one which highlighted some problems with the
non-futex threading code. Now that that's fixed, we may as
well restore the status quo.
Nikodemus Siivola [Mon, 21 Nov 2011 14:53:17 +0000 (16:53 +0200)]
smaller default dynamic-space size on GENCGC
512Mb for 32-bit platforms, 1Gb for 64-bit ones.
(OpenBSD/x86-64 is the exception using 444Mb to fit under default ulimits.)
Nikodemus Siivola [Mon, 21 Nov 2011 13:52:31 +0000 (15:52 +0200)]
make --dynamic-space-size and --control-stack-size understand power-suffixes
All of Kb, KiB, Mb, MiB, Gb, GiB are accepted, in a case-insentitive manner
-- all taken to mean powers of two.
Nikodemus Siivola [Mon, 21 Nov 2011 15:50:56 +0000 (17:50 +0200)]
fix Darwin/x86 build on Snow Leopard
EBX is linkage base, hence unavailable for us via asm()
there.
Nikodemus Siivola [Sun, 20 Nov 2011 18:09:39 +0000 (20:09 +0200)]
Revert "fix sb-posix tests on OpenBSD"
Oops. As Josh noted, the equivalent C code works, so the explanation was
bogus, and the test is better left enabled to track the issue.
This reverts commit
d94c1b4a8c534bde146823f56558faf37cd4c4d7.
Conflicts:
NEWS
Lutz Euler [Fri, 1 Jul 2011 18:54:38 +0000 (20:54 +0200)]
More compile-time error checking in NUMBER-DISPATCH
Check for some problematic cases where non-disjoint types are used
in different clauses for the same variable and throw an error at
macroexpand-time if such a case is detected. Otherwise these could
lead to the generated type-dispatching form not covering all intended
combinations of types.
The intention is to make writing and modifying complex NUMBER-DISPATCH
forms safer.
All existing uses of NUMBER-DISPATCH, insofar as they contain
non-disjoint types, are unproblematic and graded as such by the
check; thus they continue to work unchanged.
Signed-off-by: Christophe Rhodes <csr21@cantab.net>
Lutz Euler [Fri, 1 Jul 2011 16:06:17 +0000 (18:06 +0200)]
Make EXPT use double-precision throughout in more cases
lp#741564 notes that a Maxima test case fails because the result of
(EXPT <fixnum> <(complex double)>) is much less precise than expected.
This is caused by EXPT using an intermediate single-float value here.
This behaviour actually occurs for all the following combinations
of argument types:
(EXPT <(or rational single-float)> <(complex double-float)>)
(EXPT <(or (complex rational) (complex single-float))>
<(or (complex double-float) double-float)>)
In all these cases the first step EXPT does is to calculate (LOG BASE)
in single precision.
Refine the type dispatch clauses in EXPT to separate these cases
and coerce BASE to DOUBLE-FLOAT or (COMPLEX DOUBLE-FLOAT) there,
as appropriate, before applying LOG. Add tests.
Fixes lp#741564.
Signed-off-by: Christophe Rhodes <csr21@cantab.net>
Nikodemus Siivola [Sun, 20 Nov 2011 12:20:11 +0000 (14:20 +0200)]
oops, SB-EXT:DYNAMIC-SPACE-SIZE broke a test
(Package lock violation.)
Nikodemus Siivola [Sun, 20 Nov 2011 11:54:07 +0000 (13:54 +0200)]
fix RUN-PROGRAM :WAIT T on Windows
Recent change to report the errno from exec() broke things on Windows.
There when :WAIT is true it is the C code that waits, and the subsequently
returns the exit code of the process -- meaning our attempt to use 0 to
indicate exec() failure makes every successfull execution on Windows look
like an exec failure.
Oops. Use -2 instead. MORE MAGIC.
Bruce O'Neel [Sun, 20 Nov 2011 11:09:03 +0000 (13:09 +0200)]
fix sb-posix tests on OpenBSD
FCNTL.FLOCK.2 the test wants to check the PID of the lock holder, and,
OpenBSD 5.0 disallows this. OpenBSD 4.9 and earlier was fine with it.
lp#892707
Signed-off-by: Nikodemus Siivola <nikodemus@random-state.net>
Bruce O'Neel [Sun, 20 Nov 2011 11:05:01 +0000 (13:05 +0200)]
fix Darwin/PPC build
lp#892705
Signed-off-by: Nikodemus Siivola <nikodemus@random-state.net>
Zach Beane [Sat, 19 Nov 2011 21:14:06 +0000 (21:14 +0000)]
new SET-SBCL-SOURCE-LOCATION convenience function
From Zach Beane sbcl-devel 2011-11-15.
Signed-off-by: Christophe Rhodes <csr21@cantab.net>
Nikodemus Siivola [Sat, 19 Nov 2011 19:48:09 +0000 (21:48 +0200)]
sb-bsd-sockets: fix GET-HOST-BY-NAME and -ADDRESS on unthreaded builds
(Platforms with getaddrinfo.)
Broken by recent thread-safety fix for the same.
Nikodemus Siivola [Sat, 19 Nov 2011 16:41:39 +0000 (18:41 +0200)]
make RESTART-FRAME debugger command at least try to restart anon frames
Try to grab the debug-fun-fun and call it.
This /is/ an iffy proposition, though, so don't advertise it,
and caution the user before going ahead.
Nikodemus Siivola [Tue, 9 Aug 2011 16:05:42 +0000 (19:05 +0300)]
better inner and anonymous function names
* New concept: "name context". It is either name of the outermost non-NIL
block in the current lexenv (FIXME: would be better to have the outermost
global function name instead) or the source-namestring of the file in which
the function resides.
* Name anonymous functions as
(LAMBDA <lambda-list> :IN <context>)
* Name FLET and LABELS functions as
(FLET <name> :IN <context>)
and
(LABELS <name> :IN <context>)
Adjust tests to suit.
* Remove BLOCK-GENSYM as this fulfills the same goals, and together
they make backtraces overly noisy.
Nikodemus Siivola [Sat, 19 Nov 2011 15:00:57 +0000 (17:00 +0200)]
clarify GET-CAS-EXPANSION docstring
Nikodemus Siivola [Sat, 19 Nov 2011 14:39:59 +0000 (16:39 +0200)]
GC documentation tweaks
* Fold documentation of (SETF GC-LOGFILE) into that of GC-LOGFILE.
* Document default value of GENERATION-NUMBER-OF-GCS-BEFORE-PROMOTION.
* Order the dictionary entries in the manual's GC section more logically.
I hope.
Nikodemus Siivola [Sat, 19 Nov 2011 14:37:03 +0000 (16:37 +0200)]
export DYNAMIC-SPACE-SIZE from SB-EXT
Nikodemus Siivola [Sat, 19 Nov 2011 14:35:18 +0000 (16:35 +0200)]
default gen.bytes_consed_between_gc to same 5% of dynamic space size
...the previous default was 2,000,000 bytes, not 20Mb as the
documentation claimed. Oops.
Nikodemus Siivola [Sat, 19 Nov 2011 12:38:26 +0000 (14:38 +0200)]
default nursery to 5% of total dynamic space size on GENCGC
5% seems like a reasonable compromise between latency and throughput.
Also change a few related stray size_t types to os_vm_size_t, which
necessitates moving runtime options saving bits into their own header file.
Nikodemus Siivola [Sat, 19 Nov 2011 12:16:47 +0000 (14:16 +0200)]
unsigned long -> os_vm_size_t refactoring
Replace a number of GC related unsigned longs with os_vm_size_t, make it
available in on the lisp-side as well, and use where appropriate.
Makes BYTES-CONSED-BETWEEN-GCS and its SETF-version also support large
nurseries.
Nikodemus Siivola [Fri, 18 Nov 2011 19:08:16 +0000 (21:08 +0200)]
threading NEWS, and thanks to supporters
Update NEWS with the recent threading work.
Many thanks to all the IndieGoGo donors who have made these improvements --
and more to come -- possible.
www.indiegogo.com/SBCL-Threading-Improvements-1
In addition some 80 donors who didn't choose any perks at all, or were
content with a warm and fuzzy feeling, thanks are owed to:
Abhishek Reddy
Alexander Shendi
Alexander Skobelev
Alexandre Abreu
Andreas Franke
Andreas Fredriksson
Andreas Fuchs
AntonVodonosov
Arnaud Betremieux
Atte Hinkka
Austin Haas
Benjamin Tovar
Bong Munoz
Bozhidar Batsov
Brandon Werner
Brit Butler
Bruce O'Neel
CHIBA Masaomi
Carl Gay
Chad
Chaitanya Gupta
Charlie McMackin
Christian Walther
Copyleft Solutions
Cyrus Harmon
Dan Ballard
Daniel Collin
Danny Woods
Dave Newton
David BIltcliffe
David Lamkins
Eric Blossom
Erik Winkels
Francisco Vides Fernández
Gabriel Giovannetti
Gary Klimowicz
Gary Waters
Geir Tjørhom
Gene Diveglia
Geoff Cant
Geoff Wozniak
Hans Huebner
Hein Hermans
Henri Kyrki
Henry Lenzi
Heow Goodman
Hiroyuki Tokunaga
Ivan Boldyrev
Ivan Rocha
Ivan Shvedunov
James Wright
Jan Moringen
Jeff Palmucci
Jerry Errett
Johannes Grødem
Jonathan Smith
Jorge Gajon
Joseph Iacobucci
Josh Marchan
José Antonio Ortega Ruiz
Jovanovic Milan
Jānis Džeriņš
Kamil Shakirov
Kan-Ru Chen
Karsten Poeck
Kevin Raison
Kim Minh Kaplan
Lars Brinkhoff
Lee Hinman
Leslie Polzer
Liam Healy
Lin Wen Chun
Luke Crook
Luís Oliveira
Manabu Takayama
Mark Hepburn
Martin Muggli
Masatoshi SANO
Mason Smith
Mathias Dhuicq
Mathias Hellevang
Matthew Curry
Matthew Swank
Matthias Hölzl
Michael Kuijn
Milo McCheese
Morten Nygaard Åsnes
Natalie Masse Hooper
Nathan Hartman
Nicolas Neuss
Nikolaus Demmel
Norman Jaffe
Ole Arndt
Paul Nathan
Petter Egesund
Philippe Brochard
Piotr Esden-Tempski
Reuben Cornel
Rich Hickey
Robert Postill
Robert Smith
RobertSanders
Ryan Pavlik
Sean Bryant
Seth Carbon
Seth Ladygo
Slawek Zak
Slobodan Milnović
Stephen Balousek
Steve Carney
Tim Howe
Tim Ritchey
Tim Showalter
Timo Myyrä
Todd Alan Kurtz
View Software Services Ltd / P Baccou
Vincent Manis
Vsevolod Domkin
William Hay
Wukix Inc.
Xristos Kalkanis
Yoshinori Tahara
Yousuke Ushiki
Zach Beane
Zach Kost-Smith
agriff
cpc26
esologic
gabalz
hexstream
indiegogo87
lokedhs
mcturra2000
serjkl
tim67
vsedach
zellerin
Nikodemus Siivola [Fri, 18 Nov 2011 18:05:38 +0000 (20:05 +0200)]
userspace CONDITION-WAIT and interrupts
GC and signals cause WITHOUT-THREAD-WAITING-FOR to mark the thread as
temporarily not waiting for anything, restoring the old status on unwind.
This is fine for mutex deadlock detection, but now that the same slot is
used for userspace condition variable wakeups we end up in trouble:
T1: enqueue self on waitqueue, marked as waiting on it.
T1: receives an interrupt and is marked as not waiting anymore while the
interrupt is handled.
T2: delivers a wakeup to the queue, sees T1 as not waiting anymore and
drops it from the queue.
T1: resumes waiting, but isn't on the queue, and never receives a wakeup.
Extra Bonus:
If T1 times out or unwinds for any reason, it sees itself as not having
been woken up, and with interrupts disabled tries to unqueue itself
from the queue -- ending up in an uninterruptible endless loop.
The Fix:
WITHOUT-THREAD-WAITING-FOR no longer restores the waiting-for information
for waitqueues, effectively causing a bogus wakeup.
Nikodemus Siivola [Fri, 18 Nov 2011 14:37:20 +0000 (16:37 +0200)]
sb-bsd-sockets: gethostbyname and gethostbyaddr are not thread safe
...or re-entrant. Need to disable interrupts and grab a lock.
Affects only platforms without getaddrinfo.
Correct the size of memory leak fixed in last commit in NEWS -- it
was more than one word per call.
Nikodemus Siivola [Fri, 18 Nov 2011 14:33:35 +0000 (16:33 +0200)]
sb-bsd-sockets: check for MAKE-ALIEN success in GET-PROTOCOL-BY-NAME
Currently of malloc fails it returns a null alien.
Yuck.
Nikodemus Siivola [Fri, 18 Nov 2011 14:21:26 +0000 (16:21 +0200)]
sb-bsd-sockets: GET-ADDRESS-INFO foreign memory leak
Two issues:
* We were using MAKE-ALIEN and not freeing the memory.
* We were calling FREE-ADDRINFO, not FREEADDRINFO: the first is an
SB-GROVEL generated deallocator, the second is freeaddrinfo()...
Nikodemus Siivola [Fri, 18 Nov 2011 12:53:47 +0000 (14:53 +0200)]
small package lock documentation cleanup
"cause result in a..." Feh. Me good english yes.
Also mention the compile-time warning for clarity.
Nicolas Edel [Fri, 18 Nov 2011 10:49:22 +0000 (12:49 +0200)]
pass errno from exec() to parent in spawn()
Open a pipe, set FD_CLOEXEC.
Child: if exec() fails, grab errno and write it to pipe.
Parent: try to read from the pipe -- if you get something, it means the
child didn't exec and the reason is in the pipe. Wait for the child to exit
and return -1 and set errno to whatever the child got.
Also use _exit() instead of exit() when dying in the child after exec
failure -- running exit hooks there would probably be bad.
(Somewhat edited from Nicolas' original patch.)
Signed-off-by: Nikodemus Siivola <nikodemus@random-state.net>
Nikodemus Siivola [Thu, 17 Nov 2011 12:11:18 +0000 (14:11 +0200)]
semaphore notification objects
Nikodemus Siivola [Thu, 17 Nov 2011 15:06:04 +0000 (17:06 +0200)]
scarier INTERRUPT-THREAD and TERMINATE-THREAD documentation
Try to put the fear of asynch unwinds into the reader.
Nikodemus Siivola [Wed, 16 Nov 2011 15:27:15 +0000 (17:27 +0200)]
missing CAS-locks and barriers
* %WAITQUEUE-ENQUEUE was missing the CAS-lock, as was checking for
the wakeup.
* Put back the spin-before-yielding loop into WITH-CAS-LOCK, which
I'd removed for some reason.
* PPC has threads, and really needs barriers. x86oids have made me
lazy, and now we pay the price. In particular:
** THREAD-WAITING-FOR: a read barrier in the non-futex
CONDITION-WAIT -- the corresponding writes are protected
by CAS and hence provide a write barrier already.
...and just for symmetry and because this makes my poor
head hurt add write and read barriers to other places where
it is read from / written to.
** WITH-CAS-LOCK: a read barrier for the READ-FORM. Not strictly
necessary perhaps, as THREAD-YIELD most probably provides a
barrier, but this is easier to read. Since the corresponding
writes should use CAS, we're OK.
Nikodemus Siivola [Mon, 7 Nov 2011 12:49:57 +0000 (14:49 +0200)]
pthread_cond_broadcast is not asynch signal safe
AKA /less/ GC deadlocks on Darwin.
To be specific, it can cause our GC to deadlock on Darwin, with all lisp
threads spinning on the same global spinlock in the bowels of the
pthread_cond_wait implementation. That was fun to figure out.
The test (:interrupt-thread :interrupt-consing-child) is a good one
for catching this: try to run it repeatedly under an earlier SBCL
under Darwin, and sooner or later it will hang.
...with this commit, we're still using pthread_cond_broadcast, but
blocking signals around the relevant bits, which --experimentally--
makes the aforementioned test pass "somewhat more consistently".
It can still hang, but those hangs seem to be related to deferrable
signals being indefinitely blocked in one of the threads -- no idea
as of yet why.
Summa Summarum: this is a bit of a sorry bandaid, waiting for
a better solution. (Probably using realtime semaphores, which
/should/ be signal-handler safe.)
Stas Boukarev [Wed, 16 Nov 2011 18:16:52 +0000 (22:16 +0400)]
Fix typo in the man-page markup code.
Patch by Kenneth Westerback on lp#891114
Nikodemus Siivola [Wed, 16 Nov 2011 16:18:23 +0000 (18:18 +0200)]
sb-bsd-sockets: foreign memory leak in GET-PROTOCOL-BY-NAME
I blame WITH-ALIEN usage -- it masks the MAKE-ALIEN calls
from the casual eye.
Paul Khuong [Tue, 15 Nov 2011 21:20:06 +0000 (16:20 -0500)]
Plug two more CTYPE leaks into fasls
* (setf aref) would dump the declared element type on compile-time
type mismatch.
* same for function return value types (e.g. via (declare (values ...)))
Paul Khuong [Tue, 15 Nov 2011 16:53:50 +0000 (11:53 -0500)]
Plug a CTYPE leak into fasls via SETQ
Type mismatch from SETQing lexical variables used to dump CTYPE
structs directly. Splice a type specifier in instead during
IR1 conversion of SETQ so that the source form remains dumpable.
Reported with the test case by Xach on #lisp.
Fixes lp#890750.
Nikodemus Siivola [Mon, 14 Nov 2011 14:18:41 +0000 (16:18 +0200)]
document GRAB-MUTEX in the manual
lp#884099
Nikodemus Siivola [Mon, 14 Nov 2011 12:56:00 +0000 (14:56 +0200)]
symlinks and RENAME-FILE and DELETE-DIRECTORY
Both followed symlinks too eagerly.
* Presumably anyone doing (rename-file "link-to-foo" "bar") wants to rename
the link and not the file it points to -- which has the unpleasant
side-effect of breaking the selfsame link.
Make it so.
* It is less clear what someone doing (delete-directory "link-to-dir")
expects to happen -- so take the conservative option and signal an error,
and document this.
Nikodemus Siivola [Mon, 14 Nov 2011 13:56:09 +0000 (15:56 +0200)]
sb-concurrency: GATE tweak, fix building without threads
* OPEN-GATE wasn't interrupt-safe. Don't want to have an interrupt unwind
after opening the gate but before broadcasting on the condition variable.
* Disable tests needing threads on unithread builds, add one that
doesn't need threads.
Also: many thanks to Tobias Rittweiler on whose code the GATE implementation
is based!
Nikodemus Siivola [Mon, 14 Nov 2011 10:17:27 +0000 (12:17 +0200)]
sb-concurrency: add Allegro-style gate objects
Paul Khuong [Sun, 13 Nov 2011 20:00:21 +0000 (15:00 -0500)]
More numerically stable %hypot (ABS of complex floats) on win32
Based on a patch by Robert Smith.
Nikodemus Siivola [Wed, 8 Jun 2011 07:58:59 +0000 (10:58 +0300)]
extensible CAS and CAS extensions
DEFINE-CAS-EXPANDER and DEFCAS are analogous to DEFINE-SETF-EXPANDER and
DEFSETF, including CAS-functions similar to SETF-functions:
(defun (cas foo) (old new ...) ...)
THis is exported from SB-EXT for users to play with, and used to implement
our CAS places internally.
Add support for CAS of:
* SLOT-VALUE
* STANDARD-INSTANCE-ACCESS
* FUNCALLABLE-STANDARD-INSTANCE-ACCESS
In case of SLOT-VALUE we don't yet support any optimizations or specify
results when SLOT-VALUE-USING-CLASS or friends are in play -- perhaps later
we can add
(CAS SLOT-VALUE-USING-CLASS) &co
in order to support it for arbitrary instances.
Adding support for permutation vector optimization should not be too hard
either, but let's let the dust settle first...
Nikodemus Siivola [Sat, 12 Nov 2011 13:09:41 +0000 (15:09 +0200)]
clean leftover SB_LUTEX gunk from the runtime
Missed a spot...
Nikodemus Siivola [Fri, 11 Nov 2011 16:51:18 +0000 (18:51 +0200)]
package snafu on unithreaded build
Christophe Rhodes [Fri, 11 Nov 2011 16:47:30 +0000 (16:47 +0000)]
fix out-of-line structure predicates on obsolete standard-instances
Apply the same fix to typep-to-layout that I did over five years ago
to the various inline / compiler transforms. Include an out-of-line
test case.
Christophe Rhodes [Fri, 11 Nov 2011 15:29:46 +0000 (15:29 +0000)]
improve layout-invalid error message
It helps if we pass the right initialization forms to make-condition.