diff --git a/src/lj_vmprofile.c b/src/lj_vmprofile.c index e6b49888fb..eb2ef48792 100644 --- a/src/lj_vmprofile.c +++ b/src/lj_vmprofile.c @@ -90,7 +90,8 @@ static void vmprofile_signal(int sig, siginfo_t *si, void *data) /* Handle overflow from individual trace counters. */ trace = trace <= LJ_VMPROFILE_TRACE_MAX ? trace : 0; /* Phew! We have calculated the indices and now we can bump the counter. */ - assert(vmstate >= 0 && vmstate <= LJ_VMST__MAX); + lua_assert(vmstate >= 0 && vmstate <= LJ_VMST__MAX); + lua_assert(trace >= 0 && trace <= LJ_VMPROFILE_TRACE_MAX); profile->count[trace][vmstate]++; } }