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/libmime/message.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/libmime/message.c') diff --git a/src/libmime/message.c b/src/libmime/message.c index 6211ea2f3..cd3772c78 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -716,11 +716,8 @@ rspamd_message_process_plain_text_part (struct rspamd_task *task, text_part->utf_raw_content->len); if (lua_pcall (L, 1, 1, err_idx) != 0) { - GString *tb; - - tb = lua_touserdata (L, -1); - msg_err_task ("cannot call lua lua_ical.ical_txt_values: %s", tb->str); - g_string_free (tb, TRUE); + msg_err_task ("cannot call lua lua_ical.ical_txt_values: %s", + lua_tostring (L, -1)); lua_settop (L, err_idx - 1); return FALSE; -- cgit v1.2.3