Skip to content

Commit

Permalink
0.8.7.29:
Browse files Browse the repository at this point in the history
	merged dan_b patches from sbcl-devel 2004-01-22:
		"GC fixes: splay.lisp and SIGSTOP"
		"Another one for the collection [bug 108]"
  • Loading branch information
William Harold Newman committed Jan 29, 2004
1 parent 240b0db commit bb93c90
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 8 deletions.
22 changes: 22 additions & 0 deletions src/code/room.lisp
Expand Up @@ -36,6 +36,28 @@
(size (primitive-object-size obj)))
(cond
((not lowtag))
(;; KLUDGE described in dan_b message "Another one for the
;; collection [bug 108]" (sbcl-devel 2004-01-22)
;;
;; In a freshly started SBCL 0.8.7.20ish, (TIME (ROOM T)) causes
;; debugger invoked on a SB-INT:BUG in thread 5911:
;; failed AVER: "(SAP= CURRENT END)"
;; [WHN: Similar things happened on one but not the other of my
;; machines when I just run ROOM a lot in a loop.]
;;
;; This appears to be due to my [DB] abuse of the primitive
;; object macros to define a thread object that shares a lowtag
;; with fixnums and has no widetag: it looks like the code that
;; generates *META-ROOM-INFO* infers from this that even fixnums
;; are thread-sized - probably undesirable.
;;
;; This [the fix; the EQL NAME 'THREAD clause here] is more in the
;; nature of a workaround than a really good fix. I'm not sure
;; what a really good fix is: I /think/ it's probably to remove
;; the :LOWTAG option in DEFINE-PRIMITIVE-OBJECT THREAD, then teach
;; genesis to generate the necessary OBJECT_SLOT_OFFSET macros
;; for assembly source in the runtime/genesis/*.h files.
(eql name 'thread))
((not widetag)
(let ((info (make-room-info :name name
:kind :lowtag))
Expand Down
4 changes: 2 additions & 2 deletions src/code/toplevel.lisp
Expand Up @@ -532,9 +532,9 @@
"~@<Reduce debugger level (leaving debugger, returning to toplevel).~@:>")
(catch 'toplevel-catcher
(sb!unix::reset-signal-mask)
;; in the event of a control-stack-exhausted-error, we
;; In the event of a control-stack-exhausted-error, we
;; should have unwound enough stack by the time we get
;; here that this is now possible
;; here that this is now possible.
(sb!kernel::protect-control-stack-guard-page 1)
(funcall repl-fun noprint)
(critically-unreachable "after REPL")))))))))
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/gencgc.c
Expand Up @@ -2752,7 +2752,7 @@ scavenge_newspace_generation_one_scan(int generation)
"/starting one full scan of newspace generation %d\n",
generation));
for (i = 0; i < last_free_page; i++) {
/* note that this skips over open regions when it encounters them */
/* Note that this skips over open regions when it encounters them. */
if ((page_table[i].allocated & BOXED_PAGE)
&& (page_table[i].bytes_used != 0)
&& (page_table[i].gen == generation)
Expand Down
13 changes: 10 additions & 3 deletions src/runtime/interrupt.c
Expand Up @@ -544,19 +544,26 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context)
os_context_t *context = arch_os_get_context(&void_context);
struct thread *thread=arch_os_get_current_thread();
struct interrupt_data *data=thread->interrupt_data;

sigset_t ss;
int i;

if(maybe_defer_handler(sig_stop_for_gc_handler,data,
signal,info,context)){
signal,info,context)) {
return;
}
/* need the context stored so it can have registers scavenged */
fake_foreign_function_call(context);

sigemptyset(&ss);
for(i=1;i<NSIG;i++) sigaddset(&ss,i); /* Block everything. */
sigprocmask(SIG_BLOCK,&ss,0);

get_spinlock(&all_threads_lock,thread->pid);
thread->state=STATE_STOPPED;
release_spinlock(&all_threads_lock);
kill(thread->pid,SIGSTOP);

sigemptyset(&ss); sigaddset(&ss,SIG_STOP_FOR_GC);
sigwaitinfo(&ss,0);

undo_fake_foreign_function_call(context);
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/thread.c
Expand Up @@ -347,7 +347,7 @@ void gc_start_the_world()
for(p=all_threads;p;p=p->next) {
if(p==th) continue;
p->state=STATE_RUNNING;
kill(p->pid,SIGCONT);
kill(p->pid,SIG_STOP_FOR_GC);
}
release_spinlock(&all_threads_lock);
}
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8.7.28"
"0.8.7.29"

0 comments on commit bb93c90

Please sign in to comment.