summaryrefslogtreecommitdiff
path: root/gcc48-rh1312850.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gcc48-rh1312850.patch')
-rw-r--r--gcc48-rh1312850.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc48-rh1312850.patch b/gcc48-rh1312850.patch
new file mode 100644
index 0000000..841627f
--- /dev/null
+++ b/gcc48-rh1312850.patch
@@ -0,0 +1,24 @@
+2016-05-26 Martin Sebor <msebor@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * asan/asan_rtl.cc (InitializeHighMemEnd): Backport part of upstream
+ r221457 fix and typo fix from r206158.
+
+--- libsanitizer/asan/asan_rtl.cc.jj 2013-03-04 12:44:18.000000000 +0100
++++ libsanitizer/asan/asan_rtl.cc 2016-05-26 09:57:10.761973999 +0200
+@@ -308,11 +308,13 @@ static void InitializeHighMemEnd() {
+ # if defined(__powerpc64__)
+ // FIXME:
+ // On PowerPC64 we have two different address space layouts: 44- and 46-bit.
+- // We somehow need to figure our which one we are using now and choose
++ // We somehow need to figure out which one we are using now and choose
+ // one of 0x00000fffffffffffUL and 0x00003fffffffffffUL.
+ // Note that with 'ulimit -s unlimited' the stack is moved away from the top
+ // of the address space, so simply checking the stack address is not enough.
+- kHighMemEnd = (1ULL << 44) - 1; // 0x00000fffffffffffUL
++ // This should (does) work for both PowerPC64 Endian modes.
++ kHighMemEnd =
++ (1ULL << (MostSignificantSetBitIndex(GET_CURRENT_FRAME()) + 1)) - 1;
+ # else
+ kHighMemEnd = (1ULL << 47) - 1; // 0x00007fffffffffffUL;
+ # endif