bc: fix GC cooperation on internal setjmp
The direct use of `__gc_var_stack__[1]` is wrong if xform has not generated a function-call wrapper than sets that array element.
This commit is contained in:
parent
e397ad0cbb
commit
023681947c
|
@ -3877,6 +3877,14 @@
|
|||
"array access"))
|
||||
memcpy?)])
|
||||
(loop (cdr e-) (cons v result) live-vars #t)))]
|
||||
[(eq? '|XFORM_CURRENT_COUNT| (tok-n (car e-)))
|
||||
(loop (cdr e-)
|
||||
(cons (make-tok (string->symbol (format "~a_COUNT" (live-var-info-tag live-vars)))
|
||||
(tok-line (car e-))
|
||||
(tok-file (car e-)))
|
||||
result)
|
||||
live-vars
|
||||
#t)]
|
||||
[(and (assq (tok-n (car e-)) vars)
|
||||
(not (assq (tok-n (car e-)) (live-var-info-vars live-vars))))
|
||||
;; Add a live variable:
|
||||
|
|
|
@ -1701,7 +1701,7 @@ MZ_EXTERN void scheme_jit_setjmp_prepare(mz_jit_jmp_buf b);
|
|||
GC_variable_stack = (void **)(void*)(b).gcvs, \
|
||||
scheme_jit_longjmp((b).jb, v))
|
||||
# define scheme_setjmp(b) ((b).gcvs = (intptr_t)__gc_var_stack__, \
|
||||
(b).gcvs_cnt = (intptr_t)(__gc_var_stack__[1]), \
|
||||
(b).gcvs_cnt = XFORM_CURRENT_COUNT, \
|
||||
scheme_jit_setjmp((b).jb))
|
||||
#else
|
||||
# define scheme_longjmp(b, v) scheme_jit_longjmp(b, v)
|
||||
|
|
Loading…
Reference in New Issue
Block a user