1 |
jsbronder 13/07/02 02:04:18 |
2 |
|
3 |
Added: |
4 |
hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch |
5 |
Log: |
6 |
Do not override malloc when in a sandbox environment. Resolves #462602. |
7 |
|
8 |
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch |
17 |
=================================================================== |
18 |
From 094de74dc5e518a931c495692143ea3282553674 Mon Sep 17 00:00:00 2001 |
19 |
From: Justin Bronder <jsbronder@×××××.com> |
20 |
Date: Mon, 1 Jul 2013 20:37:17 -0400 |
21 |
Subject: [PATCH] hooks: disable malloc override inside of Gentoo sandbox |
22 |
|
23 |
As described in the comments in the source, Gentoo's own version of |
24 |
fakeroot, sandbox, also runs into hangs when malloc is overridden. |
25 |
Sandbox environments can easily be detected by looking for SANDBOX_PID |
26 |
in the environment. When detected, employ the same fix used for |
27 |
fakeroot. |
28 |
|
29 |
See https://bugs.gentoo.org/show_bug.cgi?id=462602 |
30 |
--- |
31 |
opal/mca/memory/linux/hooks.c | 11 +++++++++-- |
32 |
1 file changed, 9 insertions(+), 2 deletions(-) |
33 |
|
34 |
diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c |
35 |
index 6a1646f..ce91e76 100644 |
36 |
--- a/opal/mca/memory/linux/hooks.c |
37 |
+++ b/opal/mca/memory/linux/hooks.c |
38 |
@@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void) |
39 |
"fakeroot" build environment that allocates memory during |
40 |
stat() (see http://bugs.debian.org/531522). It may not be |
41 |
necessary any more since we're using access(), not stat(). But |
42 |
- we'll leave the check, anyway. */ |
43 |
+ we'll leave the check, anyway. |
44 |
+ |
45 |
+ This is also an issue when using Gentoo's version of 'fakeroot', |
46 |
+ sandbox v2.5. Sandbox environments can also be detected fairly |
47 |
+ easily by looking for SANDBOX_PID. |
48 |
+ */ |
49 |
+ |
50 |
if (getenv("FAKEROOTKEY") != NULL || |
51 |
- getenv("FAKED_MODE") != NULL) { |
52 |
+ getenv("FAKED_MODE") != NULL || |
53 |
+ getenv("SANDBOX_PID") != NULL ) { |
54 |
return; |
55 |
} |
56 |
|
57 |
-- |
58 |
1.8.1.5 |