From f63e1740edac418c2ab88d72e1ee56cecfec038a Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 11 Aug 2019 10:15:46 +0200 Subject: [PATCH] fix bug for not blanking func_hash after context release --- src/comp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/comp.c b/src/comp.c index 42186e7ea5d..7f1219780cc 100644 --- a/src/comp.c +++ b/src/comp.c @@ -2183,8 +2183,11 @@ DEFUN ("comp-init-ctxt", Fcomp_init_ctxt, Scomp_init_ctxt, sizeof (void *), false); - if (NILP (comp.func_hash)) - comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal); + /* + Always reinitialize this cause old function definitions are garbage collected + by libgccjit when the ctxt is released. + */ + comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal); /* Define data structures. */ -- 2.39.5