From fea15ec34e26dc67daf9cbbeca83162060ec0d1e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 2 Jul 2013 12:34:51 +0000 Subject: [PATCH] Add memory hooks override for Gentoo sandbox v2.5, too. Thanks to Justin Bronder for the patch. This commit was SVN r28702. --- opal/mca/memory/linux/hooks.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c index e1b43c62e0..de3a031151 100644 --- a/opal/mca/memory/linux/hooks.c +++ b/opal/mca/memory/linux/hooks.c @@ -748,9 +748,14 @@ 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; }