From a371bc41f4d208bcb2f8b56677504e1746e3bb83 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 18 May 2025 22:09:08 +0300 Subject: fix multiple active relocs --- src/compile/compile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compile') diff --git a/src/compile/compile.c b/src/compile/compile.c index 5aab67e..2c72b91 100644 --- a/src/compile/compile.c +++ b/src/compile/compile.c @@ -1974,6 +1974,10 @@ static void resolve_top_reloc(jit_state_t *j, struct relocs *relocs, struct addr assert(a); jit_patch_there(j, r, a); relocs_pop(relocs); + + /* hope this turns into a tailcall */ + if (relocs_len(relocs)) + resolve_top_reloc(j, relocs, addrs, ii); } static void resolve_relocs(jit_state_t *j, struct relocs *relocs, struct addrs *addrs, size_t ii) -- cgit v1.2.3