From eb5fc65aca905ad38bab0dae85dba0f9a56d7766 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 24 May 2019 14:13:13 +0100 Subject: [Fix] Do not use lightuserdata for traceback LuaJIT limits lightuserdata usage to 47 bits. On Arm64, this leads to break of the C <-> Lua interoperability using this type. This rework has changed traceback function behaviour from lightuserdata opaque pointer (GString * in particular) to luaL_Buffer. Issue: #2906 --- src/lua/lua_task.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lua/lua_task.c') diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index e58ff17c7..bfae06fc7 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -5685,10 +5685,8 @@ lua_lookup_words_array (lua_State *L, rspamd_lua_push_full_word (L, tok); if (lua_pcall (L, 1, 0, err_idx) != 0) { - GString *tb = lua_touserdata (L, -1); msg_err_task ("cannot call callback function for lookup words: %s", - tb->str); - g_string_free (tb, TRUE); + lua_tostring (L, -1)); } lua_settop (L, err_idx - 1); -- cgit v1.2.3