Patchwork libsanitizer merge from upstream r175042

login
register
mail settings
Submitter Jakub Jelinek
Date Feb. 28, 2013, 7:56 p.m.
Message ID <20130228195647.GV12913@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/224166/
State New
Headers show

Comments

Jakub Jelinek - Feb. 28, 2013, 7:56 p.m.
On Thu, Feb 28, 2013 at 04:30:13PM +0400, Konstantin Serebryany wrote:
> I am sorry, I missed this message.
> Indeed, the change looks safe,
> http://llvm.org/viewvc/llvm-project?rev=176250&view=rev

Thanks, here is what I've committed to gcc:

2013-02-28  Jakub Jelinek  <jakub@redhat.com>

	* asan/asan_mapping.h (kMidMemEnd): Increase to 0x4fffffffffULL.
	* asan/asan_rtl.cc (__asan_init): Increase kMidMemEnd to
	0x4fffffffffULL.



	Jakub

Patch

--- libsanitizer/asan/asan_mapping.h	(revision 176249)
+++ libsanitizer/asan/asan_mapping.h	(revision 176250)
@@ -32,13 +32,13 @@ 
 // || `[0x000000040000, 0x01ffffffffff]` || ShadowGap  ||
 //
 // Special case when something is already mapped between
-// 0x003000000000 and 0x004000000000 (e.g. when prelink is installed):
+// 0x003000000000 and 0x005000000000 (e.g. when prelink is installed):
 // || `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
 // || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
-// || `[0x004000000000, 0x02008fff6fff]` || ShadowGap3 ||
-// || `[0x003000000000, 0x003fffffffff]` || MidMem     ||
-// || `[0x00087fff8000, 0x002fffffffff]` || ShadowGap2 ||
-// || `[0x00067fff8000, 0x00087fff7fff]` || MidShadow  ||
+// || `[0x005000000000, 0x02008fff6fff]` || ShadowGap3 ||
+// || `[0x003000000000, 0x004fffffffff]` || MidMem     ||
+// || `[0x000a7fff8000, 0x002fffffffff]` || ShadowGap2 ||
+// || `[0x00067fff8000, 0x000a7fff7fff]` || MidShadow  ||
 // || `[0x00008fff7000, 0x00067fff7fff]` || ShadowGap  ||
 // || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
 // || `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
@@ -131,7 +131,7 @@  extern uptr AsanMappingProfile[];
 // difference between fixed and non-fixed mapping is below the noise level.
 static uptr kHighMemEnd = 0x7fffffffffffULL;
 static uptr kMidMemBeg =    0x3000000000ULL;
-static uptr kMidMemEnd =    0x3fffffffffULL;
+static uptr kMidMemEnd =    0x4fffffffffULL;
 #else
 SANITIZER_INTERFACE_ATTRIBUTE
 extern uptr kHighMemEnd, kMidMemBeg, kMidMemEnd;  // Initialized in __asan_init.
--- libsanitizer/asan/asan_rtl.cc	(revision 176249)
+++ libsanitizer/asan/asan_rtl.cc	(revision 176250)
@@ -459,7 +459,7 @@  void __asan_init() {
 #if ASAN_LINUX && defined(__x86_64__) && !ASAN_FIXED_MAPPING
   if (!full_shadow_is_available) {
     kMidMemBeg = kLowMemEnd < 0x3000000000ULL ? 0x3000000000ULL : 0;
-    kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x3fffffffffULL : 0;
+    kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x4fffffffffULL : 0;
   }
 #endif