From: Jérémie Astor Date: Fri, 25 Jun 2021 11:56:07 +0000 (+0200) Subject: :art: Few fixes X-Git-Tag: nightly~570 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=4ed2402e6db70ddf763265e91fc2473fe35a7403;p=gwion.git :art: Few fixes --- 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