From 4ed2402e6db70ddf763265e91fc2473fe35a7403 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 25 Jun 2021 13:56:07 +0200 Subject: [PATCH] :art: Few fixes --- src/emit/emit.c | 2 +- src/env/env.c | 2 +- src/main.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 140cd982..6cb5f5ef 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1445,7 +1445,7 @@ ANN m_bool emit_exp_call1(const Emitter emit, const Func f, assert(back->execute == SetFunc); if(f->code) { back->opcode = eRegPushImm; - back->m_val = f->code; + back->m_val = (m_uint)f->code; // back->m_val2 = SZ_INT; } else back->m_val = (m_uint)f; diff --git a/src/env/env.c b/src/env/env.c index 1bac40a4..0813904b 100644 --- a/src/env/env.c +++ b/src/env/env.c @@ -21,7 +21,7 @@ ANN static struct Env_Scope_ *new_envscope(MemPool p) { } Env new_env(MemPool p) { - const Env env = (Env)xmalloc(sizeof(struct Env_)); + const Env env = (Env)mp_malloc(p, Env); env->global_nspc = new_nspc(p, "global_nspc"); env->context = NULL; env->scope = new_envscope(p); diff --git a/src/main.c b/src/main.c index 41dd4219..024a69ba 100644 --- a/src/main.c +++ b/src/main.c @@ -7,12 +7,12 @@ #include "arg.h" static void sig(int unused NUSED) { -#ifdef BUILD_ON_WINDOWS +//#ifdef BUILD_ON_WINDOWS exit(EXIT_FAILURE); -#else - pthread_kill(pthread_self(), SIGTERM); - pthread_exit(NULL); -#endif +//#else +// pthread_kill(pthread_self(), SIGKILL); +// pthread_exit(NULL); +//#endif } #ifdef __AFL_HAVE_MANUAL_CONTROL -- 2.43.0