FFI: Fix constructor index resolution in JIT compiler.

Reported by Vladimir Davydov and Sergey Kaplun. #1441
This commit is contained in:
Mike Pall
2026-02-24 22:13:15 +01:00
parent 5db4b03aea
commit 02e2999558

View File

@@ -811,6 +811,8 @@ again:
} }
J->base[0] = lj_ir_kint(J, (int32_t)fct->size); J->base[0] = lj_ir_kint(J, (int32_t)fct->size);
return; /* Interpreter will throw for newindex. */ 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)) { } else if (ctype_isbitfield(fct->info)) {
lj_trace_err(J, LJ_TRERR_NYICONV); lj_trace_err(J, LJ_TRERR_NYICONV);
} else { } else {