fix clean-up handling for the main thread of a terminated place
This bug might be reposnible for the occassional crashes seen in
DrDr for the easter-egg test.
Merge to v6.0.1
(cherry picked from commit 83dcf446a3
)
This commit is contained in:
parent
5e5f43c2e2
commit
6cb8f9cd00
|
@ -0,0 +1,26 @@
|
|||
#lang racket/base
|
||||
(require racket/place)
|
||||
|
||||
;; When a thread is killed during `directory-list`, there's
|
||||
;; a clean-up action attached to both the thread and its
|
||||
;; `dynamic-wind` chain (effectively). Check that only one
|
||||
;; of them runs, otherwise closedir() is called twice (and
|
||||
;; libc will typically detect a mistake and abort).
|
||||
|
||||
(define (go)
|
||||
(place
|
||||
pch
|
||||
(place-channel-put pch 'ok)
|
||||
(let loop ()
|
||||
(directory-list
|
||||
(let-values ([(base name dir?)
|
||||
(split-path (collection-file-path "place.rkt" "racket"))])
|
||||
base))
|
||||
(loop))))
|
||||
|
||||
(module+ main
|
||||
(for ([i 25])
|
||||
(printf "~a\n" i)
|
||||
(define p (go))
|
||||
(place-channel-get p)
|
||||
(place-kill p)))
|
|
@ -4371,7 +4371,7 @@ static void escape_to_kill(Scheme_Thread *p)
|
|||
p->cjs.jumping_to_continuation = (Scheme_Object *)p;
|
||||
p->cjs.alt_full_continuation = NULL;
|
||||
p->cjs.is_kill = 1;
|
||||
p->cjs.skip_dws = 0;
|
||||
p->cjs.skip_dws = 1;
|
||||
scheme_longjmp(*p->error_buf, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user