Protect g->hookmask with lock when using profiler thread.

This commit is contained in:
Mike Pall
2013-09-16 11:23:10 +02:00
parent 8201fda2fc
commit b30a789ab8
4 changed files with 49 additions and 29 deletions

View File

@@ -24,6 +24,7 @@
#if LJ_HASJIT
#include "lj_ir.h"
#include "lj_jit.h"
#include "lj_trace.h"
#include "lj_ircall.h"
#include "lj_iropt.h"
#include "lj_target.h"
@@ -560,6 +561,7 @@ static void jit_profile_callback(lua_State *L2, lua_State *L, int samples,
if (G(L2)->panic) G(L2)->panic(L2);
exit(EXIT_FAILURE);
}
lj_trace_abort(G(L2));
}
}