Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3 Use the proper stack aligment for the architec...
details: https://anonhg.NetBSD.org/src/rev/57705bdaad33
branches: trunk
changeset: 447588:57705bdaad33
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 17 20:36:51 2019 +0000
description:
Use the proper stack aligment for the architecture. Fixes broken asan
tests on i386.
diffstat:
external/gpl3/gcc.old/dist/libsanitizer/asan/asan_thread.cc | 9 ++++++++-
external/gpl3/gcc/dist/libsanitizer/asan/asan_thread.cc | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r cba9ea481721 -r 57705bdaad33 external/gpl3/gcc.old/dist/libsanitizer/asan/asan_thread.cc
--- a/external/gpl3/gcc.old/dist/libsanitizer/asan/asan_thread.cc Thu Jan 17 19:26:03 2019 +0000
+++ b/external/gpl3/gcc.old/dist/libsanitizer/asan/asan_thread.cc Thu Jan 17 20:36:51 2019 +0000
@@ -9,6 +9,10 @@
//
// Thread-related code.
//===----------------------------------------------------------------------===//
+
+#define __EXPOSE_STACK
+#include <sys/param.h>
+
#include "asan_allocator.h"
#include "asan_interceptors.h"
#include "asan_poisoning.h"
@@ -221,7 +225,10 @@
access->frame_descr = (const char *)((uptr*)bottom)[1];
return true;
}
- uptr aligned_addr = addr & ~(SANITIZER_WORDSIZE/8 - 1); // align addr.
+#ifndef STACK_ALIGNBYTES
+# define STACK_ALIGNBYTES (~(SANITIZER_WORDSIZE/8 - 1))
+#endif
+ uptr aligned_addr = addr & STACK_ALIGNBYTES; // align addr.
u8 *shadow_ptr = (u8*)MemToShadow(aligned_addr);
u8 *shadow_bottom = (u8*)MemToShadow(bottom);
diff -r cba9ea481721 -r 57705bdaad33 external/gpl3/gcc/dist/libsanitizer/asan/asan_thread.cc
--- a/external/gpl3/gcc/dist/libsanitizer/asan/asan_thread.cc Thu Jan 17 19:26:03 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/asan/asan_thread.cc Thu Jan 17 20:36:51 2019 +0000
@@ -9,6 +9,10 @@
//
// Thread-related code.
//===----------------------------------------------------------------------===//
+
+#define __EXPOSE_STACK
+#include <sys/param.h>
+
#include "asan_allocator.h"
#include "asan_interceptors.h"
#include "asan_poisoning.h"
@@ -221,7 +225,10 @@
access->frame_descr = (const char *)((uptr*)bottom)[1];
return true;
}
- uptr aligned_addr = addr & ~(SANITIZER_WORDSIZE/8 - 1); // align addr.
+#ifndef STACK_ALIGNBYTES
+# define STACK_ALIGNBYTES (~(SANITIZER_WORDSIZE/8 - 1))
+#endif
+ uptr aligned_addr = addr & STACK_ALIGNBYTES; // align addr.
u8 *shadow_ptr = (u8*)MemToShadow(aligned_addr);
u8 *shadow_bottom = (u8*)MemToShadow(bottom);
Home |
Main Index |
Thread Index |
Old Index