FFI: Add missing write barrier on C library index update.

Contributed by Yichun Zhang.
This commit is contained in:
Mike Pall 2019-12-08 19:28:54 +01:00
parent 478bcfe52a
commit 1d1bac5a65

View File

@ -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;