Bug 1030899 - Remove issetugid usage on jemalloc. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 08 Jul 2014 17:52:09 +0900
changeset 192836 fb2a8327a8bbcb7c7e93c99d997e11e94a50cc5b
parent 192835 7e27f2f4793c08f1147470a9196f7107131e9f51
child 192837 e5c88681e091142ddb99a0b49ef0b691e6c6d1d7
push id7663
push userkwierso@gmail.com
push dateWed, 09 Jul 2014 03:08:08 +0000
treeherderfx-team@48de6f4f82af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1030899
milestone33.0a1
Bug 1030899 - Remove issetugid usage on jemalloc. r=glandium
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -220,17 +220,16 @@
 
 #ifdef MALLOC_PAGEFILE
 /* Write size when initializing a page file. */
 #  define MALLOC_PAGEFILE_WRITE_SIZE 512
 #endif
 
 #if defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
 #define	_GNU_SOURCE /* For mremap(2). */
-#define	issetugid() 0
 #if 0 /* Enable in order to test decommit code on Linux. */
 #  define MALLOC_DECOMMIT
 #endif
 #endif
 
 #include <sys/types.h>
 
 #include <errno.h>
@@ -261,17 +260,16 @@
 #define	vsnprintf _vsnprintf
 
 #ifndef NO_TLS
 static unsigned long tlsIndex = 0xffffffff;
 #endif 
 
 #define	__thread
 #define	_pthread_self() __threadid()
-#define	issetugid() 0
 
 /* use MSVC intrinsics */
 #pragma intrinsic(_BitScanForward)
 static __forceinline int
 ffs(int x)
 {
 	unsigned long i;
 
@@ -5675,18 +5673,17 @@ malloc_init_hard(void)
 #endif
 			{
 				/* No configuration specified. */
 				buf[0] = '\0';
 				opts = buf;
 			}
 			break;
 		case 1:
-			if (issetugid() == 0 && (opts =
-			    getenv("MALLOC_OPTIONS")) != NULL) {
+			if ((opts = getenv("MALLOC_OPTIONS")) != NULL) {
 				/*
 				 * Do nothing; opts is already initialized to
 				 * the value of the MALLOC_OPTIONS environment
 				 * variable.
 				 */
 			} else {
 				/* No configuration specified. */
 				buf[0] = '\0';