(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))
"~@<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")))))))))
"/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)
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);
}
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);
}
;;; 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"