From 55ffc24011e848fd841f705f6c882f0830cbb629 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 14 Feb 2018 08:05:18 -0700 Subject: [PATCH] JIT: fix bug with `call-with-values` Handling of runstack overflow wasn't right for platforms with a distinction between short and long jumps --- which includes x86_64, but only after enough code has been allocated. --- racket/src/racket/src/jit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/racket/src/racket/src/jit.c b/racket/src/racket/src/jit.c index a636e1f1be..c99665c9c7 100644 --- a/racket/src/racket/src/jit.c +++ b/racket/src/racket/src/jit.c @@ -2570,7 +2570,9 @@ int scheme_generate(Scheme_Object *obj, mz_jit_state *jitter, int is_tail, int w (void)jit_calli(code); /* non-tail code pops args off runstack for us */ jitter->need_set_rs = 1; + __START_SHORT_JUMPS__(1); mz_patch_ucbranch(ref5); + __END_SHORT_JUMPS__(1); if (target != JIT_R0) jit_movr_p(target, JIT_R0); }