diff options
author | Mike Pall <mike> | 2019-12-08 19:28:54 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2019-12-08 19:32:16 +0100 |
commit | 1d1bac5a65e03e3fc1cebaf3e3699488c10428ff (patch) | |
tree | aa5f65c2b6c03874dc7e21a652dad2053e4f50c0 | |
parent | 478bcfe52a653bf338f17690147fa9f5793f5b42 (diff) | |
download | luajit-1d1bac5a65e03e3fc1cebaf3e3699488c10428ff.tar.gz luajit-1d1bac5a65e03e3fc1cebaf3e3699488c10428ff.tar.bz2 luajit-1d1bac5a65e03e3fc1cebaf3e3699488c10428ff.zip |
FFI: Add missing write barrier on C library index update.
Contributed by Yichun Zhang.
-rw-r--r-- | src/lj_clib.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
364 | cd = lj_cdata_new(cts, id, CTSIZE_PTR); | 364 | cd = lj_cdata_new(cts, id, CTSIZE_PTR); |
365 | *(void **)cdataptr(cd) = p; | 365 | *(void **)cdataptr(cd) = p; |
366 | setcdataV(L, tv, cd); | 366 | setcdataV(L, tv, cd); |
367 | lj_gc_anybarriert(L, cl->cache); | ||
367 | } | 368 | } |
368 | } | 369 | } |
369 | return tv; | 370 | return tv; |