From b5db21d6c4d98d9552456d084ff666e9147b9c96 Mon Sep 17 00:00:00 2001 From: Pierre Carru Date: Tue, 19 Nov 2013 19:41:16 +0100 Subject: [PATCH] guile: disable guile gmp allocator (fix crash on unload of relay plugin) (bug #40628) --- AUTHORS | 1 + ChangeLog | 2 ++ src/plugins/guile/weechat-guile.c | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/AUTHORS b/AUTHORS index 084a4a2fd..00552a8a0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -55,6 +55,7 @@ Alphabetically: * Paul Komkoff * Pavel Shevchuk (Stalwart) * Peter Boström (pbos) +* Pierre Carru * Piotr Szymaniak * Pistos * Quentin Glidic (SardemFF7) diff --git a/ChangeLog b/ChangeLog index 357104ca1..5cb5e16c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] string_eval_expression and command /eval * api: add support for C++ plugins * api: fix read of arrays in hdata functions hdata_ (bug #40354) +* guile: disable guile gmp allocator (fix crash on unload of relay plugin) + (bug #40628) * irc: fix groups in channel nicklist when reconnecting to a server that supports more nick prefixes than the previously connected server * irc: fix auto-switch to channel buffer when doing /join channel (without "#") diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index a8efec6e4..084c8a1c4 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -972,6 +972,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) guile_stdout = NULL; + /* + * prevent guile to use its own gmp allocator, because it can conflict + * with other plugins using GnuTLS like relay, which can crash WeeChat + * on unload (or exit) + */ + scm_install_gmp_memory_functions = 0; + scm_init_guile (); guile_module_weechat = scm_c_define_module ("weechat",