summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2018-10-30 08:48:55 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2018-10-30 08:48:55 +0000
commitf3edea755080432bf62dbb6672cc96180c07fe5e (patch)
tree16076796f1f85fca61be1ca026ccea81357120f5
parent772c929d551eb4021224fe02e7820891c77c1a15 (diff)
turn off jit by default in mfluajit
git-svn-id: svn://tug.org/texlive/trunk@49026 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/mfluadir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/mfluadir/mfluac.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/mfluadir/ChangeLog b/Build/source/texk/web2c/mfluadir/ChangeLog
index 83789988f37..966d64fe638 100644
--- a/Build/source/texk/web2c/mfluadir/ChangeLog
+++ b/Build/source/texk/web2c/mfluadir/ChangeLog
@@ -1,3 +1,10 @@
+2018-30-10 Luigi Scarso <luigi.scarso@gmail.com>
+
+ * jit default off in mfluajit: in some platforms (e.g NetBSD8)
+ executing code from memory is forbidden by default.
+ In case, a user can enable jit at runtime.
+
+
2018-02-08 Luigi Scarso <luigi.scarso@gmail.com>
* MFLua 0.9.
diff --git a/Build/source/texk/web2c/mfluadir/mfluac.c b/Build/source/texk/web2c/mfluadir/mfluac.c
index ee014ec6f9b..31ed66a4e3e 100644
--- a/Build/source/texk/web2c/mfluadir/mfluac.c
+++ b/Build/source/texk/web2c/mfluadir/mfluac.c
@@ -10,6 +10,9 @@
#include <lualib.h>
#include <lauxlib.h>
#include <kpathsea/kpathsea.h>
+#if defined(JIT)
+#include <luajit.h>
+#endif
/**************************************************************/
/* */
/* private functions */
@@ -537,6 +540,7 @@ int mfluabeginprogram(void)
lua_pushstring(L,"MFbuiltin");
#ifdef MFLuaJIT
/* 5.1 */
+ luaJIT_setmode(L, 0, LUAJIT_MODE_ENGINE|LUAJIT_MODE_OFF);
lua_newtable(L);
luaL_register (L,NULL,MFbuiltin_l);
#else