diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-24 14:13:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-24 14:13:13 +0100 |
commit | eb5fc65aca905ad38bab0dae85dba0f9a56d7766 (patch) | |
tree | 126bf68a7c23e471920f73951ad8cd2326237a5b /src/lua/lua_dns_resolver.c | |
parent | 8303b194152ffc02b5079b6bd08f1fecfd43f5d0 (diff) | |
download | rspamd-eb5fc65aca905ad38bab0dae85dba0f9a56d7766.tar.gz rspamd-eb5fc65aca905ad38bab0dae85dba0f9a56d7766.zip |
[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
Diffstat (limited to 'src/lua/lua_dns_resolver.c')
-rw-r--r-- | src/lua/lua_dns_resolver.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c index 4234504ee..56b6989c0 100644 --- a/src/lua/lua_dns_resolver.c +++ b/src/lua/lua_dns_resolver.c @@ -143,7 +143,6 @@ lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg) struct lua_callback_state cbs; rspamd_mempool_t *pool; gint err_idx; - GString *tb = NULL; pool = cd->pool; lua_thread_pool_prepare_callback (cd->resolver->cfg->lua_thread_pool, &cbs); @@ -199,12 +198,8 @@ lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg) } if (lua_pcall (L, 7, 0, err_idx) != 0) { - tb = lua_touserdata (L, -1); - - if (tb) { - msg_err_pool_check ("call to dns callback failed: %s", tb->str); - g_string_free (tb, TRUE); - } + msg_err_pool_check ("call to dns callback failed: %s", + lua_tostring (L, -1)); } lua_settop (L, err_idx - 1); |