aboutsummaryrefslogtreecommitdiff
path: root/src/lj_crecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_crecord.c')
-rw-r--r--src/lj_crecord.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index 2c63e8a6..9457b519 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -15,6 +15,7 @@
15#include "lj_tab.h" 15#include "lj_tab.h"
16#include "lj_frame.h" 16#include "lj_frame.h"
17#include "lj_ctype.h" 17#include "lj_ctype.h"
18#include "lj_cdata.h"
18#include "lj_cparse.h" 19#include "lj_cparse.h"
19#include "lj_cconv.h" 20#include "lj_cconv.h"
20#include "lj_clib.h" 21#include "lj_clib.h"
@@ -785,7 +786,7 @@ static TRef crec_call_args(jit_State *J, RecordFFData *rd,
785 did = ctype_cid(ctf->info); 786 did = ctype_cid(ctf->info);
786 } else { 787 } else {
787 if (!(ct->info & CTF_VARARG)) 788 if (!(ct->info & CTF_VARARG))
788 lj_trace_err(J, LJ_TRERR_NYICALL); /* Too many arguments. */ 789 lj_trace_err(J, LJ_TRERR_NYICALL); /* Too many arguments. */
789 did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */ 790 did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */
790 } 791 }
791 d = ctype_raw(cts, did); 792 d = ctype_raw(cts, did);
@@ -853,6 +854,12 @@ static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd)
853 CType *ctr = ctype_rawchild(cts, ct); 854 CType *ctr = ctype_rawchild(cts, ct);
854 IRType t = crec_ct2irt(ctr); 855 IRType t = crec_ct2irt(ctr);
855 TRef tr; 856 TRef tr;
857 TValue tv;
858 /* Check for blacklisted C functions that might call a callback. */
859 setlightudV(&tv,
860 cdata_getptr(cdataptr(cd), (LJ_64 && tp == IRT_P64) ? 8 : 4));
861 if (tvistrue(lj_tab_get(J->L, cts->miscmap, &tv)))
862 lj_trace_err(J, LJ_TRERR_BLACKL);
856 if (ctype_isvoid(ctr->info)) { 863 if (ctype_isvoid(ctr->info)) {
857 t = IRT_NIL; 864 t = IRT_NIL;
858 rd->nres = 0; 865 rd->nres = 0;