Commits on Apr 2, 2009
  1. release, will be tagged as sbcl_1_0_27

    Richard M Kreuter
    Richard M Kreuter committed Apr 2, 2009
Commits on Mar 27, 2009
  1. Revert

    jsnell committed Mar 27, 2009
            * And add testcase showing why the revert was needed.
Commits on Mar 24, 2009
  1. fix ERROR leaking memory

    Gabor Melis
    Gabor Melis committed Mar 24, 2009
    Make *COMPILED-DEBUG-FUNS* a weak keyed hash table. Add test.
Commits on Mar 23, 2009
  1. tighter VECTOR-PUSH-EXTEND argument type

    csrhodes committed Mar 23, 2009
    	The optional extension parameter must be a positive integer.
    	... declare this in fndb;
    	... fix the erroneous use in constraints (not only ensuring
    		positivity, but also it's an extension not a new-length
    	Issue brought to light by Peter Graves' XCL.
  2. more stack safety

    Gabor Melis
    Gabor Melis committed Mar 23, 2009
    Add another guard page to the control, binding and alien stacks that
    will lose() whenever it's touched so that if the handler manages to
    recover from stack exhaustion then we can be sure that image is not
Commits on Mar 22, 2009
  1. Solaris x86-64 support

    jsnell committed Mar 22, 2009
            * Patch by Alex Viskovatoff
  2. fix GC/SIG_STOP_FOR_GC race

    Gabor Melis
    Gabor Melis committed Mar 22, 2009
    Consider this: in a PA section GC is requested: GC_PENDING,
    pseudo_atomic_interrupted and gc_blocked_deferrables are set,
    deferrables are blocked then pseudo_atomic_atomic is cleared, but a
    SIG_STOP_FOR_GC arrives before trapping to interrupt_handle_pending.
    In sig_stop_for_gc_handler, GC_PENDING is cleared but
    pseudo_atomic_interrupted is not and we go on running with
    pseudo_atomic_interrupted but without a pending interrupt or GC.
    GC_BLOCKED_DEFERRABLES is also left at 1.
    Add more checks, fix comments.
  3. fix gencgc on ppc

    Gabor Melis
    Gabor Melis committed Mar 22, 2009
    Regression from
    Store the context of allocation trap in interrupt_data and frob that
    when gencgc wants to block deferrables.
    Also: remove unused, buggy get_interrupt_context_for_thread.
  4. interrupt.c refactoring

    Gabor Melis
    Gabor Melis committed Mar 22, 2009
    - check that all or none of the deferrable signals are blocked
    - make passing NULL for sigset in the right context mean the current
      sigmask: there is only a single block_signals() function that can
      performs sigset arithmetic or change the current mask.
    - print pc and sp on memory faults to ease debugging
  5. minor portability fixes

    csrhodes committed Mar 22, 2009
    	Motivated by restarting work on a repeatable-xc-fasl project,
    	somewhat delayed by Real Life matters...
    	... use an explicit TYPE declaration for defined types;
    	... don't redefine host functions when building fasls from the
    	... catch one egregiously bad case of a dead clause in TYPECASE
    		(more lurk);
    	... don't use host symbols in genesis;
    	... define a total order for emitting constants.h.
    	Now clisp on my machine, with the current phase of the moon,
    	gets as far as dumping the cold core.  More Work Needed.
  6. OpenBSD x86-64 support

    jsnell committed Mar 22, 2009
            * Patch by Josh Elsasser
  7. Don't allow (LOOP FOR X ACROSS A ...) where A evaluates to…

    jsnell committed Mar 22, 2009
    … NIL
            * Patch by Daniel Lowe
  8. Fix the error message for ENOMEM on mprotect

    jsnell committed Mar 22, 2009
            * Error message was not updated when the variable was renamed
            * s/size/bytes/, s/parms/backend-parms/
Commits on Mar 20, 2009
  1. darwin interrupt fixes

    Gabor Melis
    Gabor Melis committed Mar 20, 2009
    Work around raise(signal) apparently not raising the signal under some
    circumstances. See sbcl-devel thread "Hang in tests on Intel MacOS
    10.5.6" starting on 2009-03-14.
    Also, block all blockables when in install_handler, having just one of
    the signals blocked breaks invariants (not really darwin specific).
    Replace abort() after the call mach_msg_server() with more a
    informative lose(). It's actually returns after attaching and
    detaching gdb.
Commits on Mar 19, 2009
  1. reduce consing in MAP-ALLOCATED-OBJECTS

    Gabor Melis
    Gabor Melis committed Mar 19, 2009
    ... on platforms where dynamic space extends past fixnum range
    Thanks to Bart Botta for the patch.
Commits on Mar 17, 2009
  1. QSHOW changes, bug reporting guidelines

    Gabor Melis
    Gabor Melis committed Mar 17, 2009
    - change runtime.h so that a simple '#define QSHOW_SIGNAL 1' turns
    QSHOW automatically and defaults to blocking signals during printing
    - add notes to BUGS on how to report bugs related to signal handling
    - kill a warning in thread.c in code conditional on QSHOW_SIGNAL
    - add #include <stdio.h> to x86{-64,}-darwin-os.c so that it compiles
      with QSHOW
    - add comment explaining the previous commit
  2. use a signal for SIG_STOP_FOR_GC > SIGSEGV on Linux

    Gabor Melis
    Gabor Melis committed Mar 17, 2009
    On Linux a signal generated by pthread_kill() with a signum that's
    lower than SIGSEGV can be delivered before a synchronously triggered
    SIGSEGV. This means that the sigsegv handler will be invoked with its
    context pointing to the handler for the signal that pthread_kill()
    sent. It's not really specific to SIGSEGV, it's the same for any
    synchronously generated signal.
    To work around this, we must never pthread_kill() with a signal with a
    lower signum than any of the synchronously triggered signals that we
    use: SIGTRAP, SIGSEGV, etc. In practice, currently we only send
    SIGPIPE to indicate that the thread interruption queue may need to be
    looked at and SIG_STOP_FOR_GC that's defined as SIGUSR1 currently.
    With SIGUSR1 being 10 and SIGSEGV 11 this can make
    handle_guard_page_triggered lose badly if GC wants to stop the thread
    at the same time. So let's use SIGUSR2 instead that's 12. Do the same
    on other OSes they may have same bug.
    See thread "Signal delivery order" from 2009-03-14 on
Commits on Mar 16, 2009
  1. use private operations on futexes

    Gabor Melis
    Gabor Melis committed Mar 16, 2009
    It allows the linux kernel to avoid contention with mmap.

    Gabor Melis
    Gabor Melis committed Mar 16, 2009
    - minimize the window where a CONDITION-WAIT and a CONDITION-NOTIFY
      race to FUTEX-WAIT and FUTEX-WAKE respectively
    - make reacquiration of the mutex in CONDITION-WAIT interruptible
    - make RELEASE-MUTEX return silently without doing anything if the
      owner is not the current thread. This eliminates spurious warnings
      upon async unwinding from the mutex reacquiration path of
    - add IF-NOT-OWNER parameter to RELEASE-MUTEX with three possible
      values: :PUNT, :WARN, :FORCE (see docstring).
  3. less pessimal waitqueues

    Gabor Melis
    Gabor Melis committed Mar 16, 2009
    Readers calling CONDITION-WAIT don't interfere with each other.
    other readers entering FUTEX-WAIT to return with EWOULDBLOCK.
    Set WAITQUEUE-DATA to NIL in readers, and to *CURRENT-THREAD* in
    Also, fix a warning in :SEMAPHORE-MULTIPLE-WAITERS test.
Commits on Mar 14, 2009
  1. alloc_code_object facelift

    Gabor Melis
    Gabor Melis committed Mar 14, 2009
    - use offsetof trace_table_offset instead of a hard coded constant
    - alloc (boxed + unboxed) bytes not words
    - check the gc is inhibited because the half initilialized code object
      could trip gc
Commits on Mar 2, 2009
Commits on Mar 1, 2009
  1. fix compilation on win32

    Gabor Melis
    Gabor Melis committed Mar 1, 2009
Commits on Feb 24, 2009
  1. SUB-GC: don't observe deadlines

    Gabor Melis
    Gabor Melis committed Feb 24, 2009
    - because the condition that's signalled can cause arbitrary code to
      run catching us with pants down
    - and we should not skip gc if it was triggerred
Commits on Feb 17, 2009
  1. x86 disassembler fixes.

    Alastair Bridgewater
    Alastair Bridgewater committed Feb 17, 2009
      Made operand-size-prefix bytes disassemble correctly, using the same
    approach used in the x86-64 backend (extra instruction formats for
    reading the prefix byte).
      Fixed movzx and movsx instructions to indicate the size of the source
    data when moving from memory.
      Added printers for cbw, cwde and cwd instructions.
Commits on Feb 16, 2009
  1. centralize scattered arch_os_get_context() calls

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    ... to the six signal handlers trampolines. These are now the only
    places where void_context appears, the rest of the runtime uses
    Also, the &void_context+37 hack was removed. On Sparc/Linux the third
    parameter of SA_SIGINFO signal handlers is a pointer to sigcontext,
    which happens to be the same as &void_context+37 most of the time,
    I have tested two on Sparc/Linux boxes, one running 2.6.26 that
    randomly segfaulted compiling itself with, and another
    runnin 2.6.24 that worked fine before at that version.
    Thanks to Bruce O'Neel for the shell access.
  2. fix gencgc_handle_wp_violation on multicpu systems

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    Acquire free_pages_lock around page_table accesses to be sure that the
    changes actually propagate to other CPUs and we don't end up losing in
    the else branch and also to prevent problems caused by the compiler or
    the processor reordering stuff.
  3. go through lisp_memory_fault_error on all platforms

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    ... so that the corruption mechanism can kick in.

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    ... instead of WITH-RECURSIVE-SPINLOCK because it's possible to
    deadlock due to lock ordering with sufficiently unlucky interrupts as
    demonstrated by test (:timer :parallel-unschedule) with low
    This affects hash tables and some pcl locks.
    Also, use WITH-RECURSIVE-MUTEX for packages.
    Not a spinlock becuase it can be held for a long time and not a system
    lock (i.e. with WITHOUT-INTERRUPTS) because conflicts are signalled
    while holding the lock which I think this warrants a FIXME.
  5. detect binding and alien stack exhaustion

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    Alien stack exhaustion machinery only works on x86oids.
  6. x86/x86-64 unithread: use the allocated alien stack

    Gabor Melis
    Gabor Melis committed Feb 16, 2009
    ... in struct thread and not the original control stack that we switch
    away from in call_into_lisp_first_time.
  7. signals internals doc

    Gabor Melis
    Gabor Melis committed Feb 16, 2009