]> Nishi Git Mirror - gwion.git/commitdiff
:art: Few fixes
authorJérémie Astor <fennecdjay@gmail.com>
Fri, 25 Jun 2021 11:56:07 +0000 (13:56 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Fri, 25 Jun 2021 11:56:07 +0000 (13:56 +0200)
src/emit/emit.c
src/env/env.c
src/main.c

index 140cd98294cf6c91d1f10b5a1ad72ce107d704c4..6cb5f5eff545ed136e4b36c95b434e4dd3fb4bb1 100644 (file)
@@ -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;
index 1bac40a4f926c8370a02e8cd5eabee50a90a64f5..0813904b498145db9d58a429e6b6fa3cd7ac1bc2 100644 (file)
@@ -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);
index 41dd4219cbcea7b281640d795d5be12eeb61e3d0..024a69ba365bb7e1bd45cd2f6a88a3f4d7731afd 100644 (file)
@@ -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