aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch')
-rw-r--r--sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch
new file mode 100644
index 000000000..5683c81b4
--- /dev/null
+++ b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch
@@ -0,0 +1,42 @@
+From 094de74dc5e518a931c495692143ea3282553674 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 1 Jul 2013 20:37:17 -0400
+Subject: [PATCH] hooks: disable malloc override inside of Gentoo sandbox
+
+As described in the comments in the source, Gentoo's own version of
+fakeroot, sandbox, also runs into hangs when malloc is overridden.
+Sandbox environments can easily be detected by looking for SANDBOX_PID
+in the environment. When detected, employ the same fix used for
+fakeroot.
+
+See https://bugs.gentoo.org/show_bug.cgi?id=462602
+---
+ opal/mca/memory/linux/hooks.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c
+index 6a1646f..ce91e76 100644
+--- a/opal/mca/memory/linux/hooks.c
++++ b/opal/mca/memory/linux/hooks.c
+@@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void)
+ "fakeroot" build environment that allocates memory during
+ stat() (see http://bugs.debian.org/531522). It may not be
+ necessary any more since we're using access(), not stat(). But
+- we'll leave the check, anyway. */
++ we'll leave the check, anyway.
++
++ This is also an issue when using Gentoo's version of 'fakeroot',
++ sandbox v2.5. Sandbox environments can also be detected fairly
++ easily by looking for SANDBOX_PID.
++ */
++
+ if (getenv("FAKEROOTKEY") != NULL ||
+- getenv("FAKED_MODE") != NULL) {
++ getenv("FAKED_MODE") != NULL ||
++ getenv("SANDBOX_PID") != NULL ) {
+ return;
+ }
+
+--
+1.8.1.5
+