From 1d1bac5a65e03e3fc1cebaf3e3699488c10428ff Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 8 Dec 2019 19:28:54 +0100 Subject: [PATCH] FFI: Add missing write barrier on C library index update. Contributed by Yichun Zhang. --- src/lj_clib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_clib.c b/src/lj_clib.c index dc72dced..41a8738e 100644 --- a/src/lj_clib.c +++ b/src/lj_clib.c @@ -364,6 +364,7 @@ TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name) cd = lj_cdata_new(cts, id, CTSIZE_PTR); *(void **)cdataptr(cd) = p; setcdataV(L, tv, cd); + lj_gc_anybarriert(L, cl->cache); } } return tv;