summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-05-25 22:01:38 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-25 22:17:38 +0200
commitd92ee0a8bdc324726e737bf4ef099d75724ce8c9 (patch)
tree10e11c5e9f96e231f4728cac4574fdd3c818fca0
parente4c02ac70f408ae3a4f6de761707a7ca7e5525e5 (diff)
downloadguix-d92ee0a8bdc324726e737bf4ef099d75724ce8c9.tar.gz
guile: Leave 'scm_install_gmp_memory_functions' unchanged.
Since the switch to Guile 3.0.7 using mini-GMP, we can leave
'scm_install_gmp_memory_functions' to its default value, which is to use
custom memory allocators; there is no interference with users of GMP
such as GnuTLS/Nettle.

* gnu/packages/aux-files/guile-launcher.c (main) [!SCM_ENABLE_MINI_GMP]:
Leave 'scm_install_gmp_memory_functions' unchanged.
-rw-r--r--gnu/packages/aux-files/guile-launcher.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c
index 47ba069de1..ad0094bff5 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -82,10 +82,13 @@ main (int argc, char **argv)
   unsetenv ("GUILE_LOAD_PATH");
   unsetenv ("GUILE_LOAD_COMPILED_PATH");
 
-  /* XXX: Do not let GMP allocate via libgc as this can lead to memory
-     corruption in GnuTLS/Nettle since Nettle also uses GMP:
+#if !SCM_ENABLE_MINI_GMP
+  /* XXX: On Guile < 3.0.6 and Guile built without its bundled mini-GMP, do
+     not let GMP allocate via libgc as this can lead to memory corruption in
+     GnuTLS/Nettle since Nettle also uses GMP:
      <https://issues.guix.gnu.org/46330>.  */
   scm_install_gmp_memory_functions = 0;
+#endif
 
   scm_boot_guile (argc, argv, inner_main, 0);
   return 0; /* never reached */