From 02e29995581cb568a784a9b996cd5e9139cd0737 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 24 Feb 2026 22:13:15 +0100 Subject: [PATCH] FFI: Fix constructor index resolution in JIT compiler. Reported by Vladimir Davydov and Sergey Kaplun. #1441 --- src/lj_crecord.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 85362ea5..4adfefe6 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -811,6 +811,8 @@ again: } J->base[0] = lj_ir_kint(J, (int32_t)fct->size); return; /* Interpreter will throw for newindex. */ + } else if (cd && cd->ctypeid == CTID_CTYPEID) { + /* Only resolve constants and metamethods for constructors. */ } else if (ctype_isbitfield(fct->info)) { lj_trace_err(J, LJ_TRERR_NYICONV); } else {