summaryrefslogtreecommitdiff
path: root/system/gcc/sanitation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/gcc/sanitation.patch')
-rw-r--r--system/gcc/sanitation.patch43
1 files changed, 40 insertions, 3 deletions
diff --git a/system/gcc/sanitation.patch b/system/gcc/sanitation.patch
index 861f5d08e..984b60498 100644
--- a/system/gcc/sanitation.patch
+++ b/system/gcc/sanitation.patch
@@ -1,5 +1,5 @@
---- gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp.old 2024-05-21 07:47:42.000000000 +0000
-+++ gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp 2024-06-20 23:28:49.290053800 +0000
+--- gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp.old 2024-05-21 02:47:42.000000000 -0500
++++ gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp 2024-07-24 15:56:06.119891718 -0500
@@ -82,6 +82,10 @@
# include <sys/sysmacros.h>
#endif
@@ -71,7 +71,24 @@
// Doesn't set sa_restorer if the caller did not set it, so use with caution
//(see below).
int internal_sigaction_norestorer(int signum, const void *act, void *oldact) {
-@@ -2173,11 +2170,20 @@
+@@ -1677,6 +1674,8 @@
+ return res;
+ }
+ #elif defined(__arm__)
++#pragma GCC push_options
++#pragma GCC optimize("omit-frame-pointer")
+ uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
+ int *parent_tidptr, void *newtls, int *child_tidptr) {
+ unsigned int res;
+@@ -1742,6 +1741,7 @@
+ : "memory");
+ return res;
+ }
++#pragma GCC pop_options
+ #endif
+ #endif // SANITIZER_LINUX
+
+@@ -2173,11 +2173,20 @@
*bp = ucontext->uc_mcontext.mc_frame[31];
# else
ucontext_t *ucontext = (ucontext_t*)context;
@@ -145,3 +162,23 @@
// GLIBC 2.20+ sys/user does not include asm/ptrace.h
# include <asm/ptrace.h>
#endif
+--- gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_syscall_linux_arm.inc.old 2024-05-21 02:47:42.000000000 -0500
++++ gcc-13.3.0/libsanitizer/sanitizer_common/sanitizer_syscall_linux_arm.inc 2024-07-24 15:56:06.129890658 -0500
+@@ -12,6 +12,9 @@
+
+ #define SYSCALL(name) __NR_ ## name
+
++#pragma GCC push_options
++#pragma GCC optimize("omit-frame-pointer")
++
+ static uptr __internal_syscall(u32 nr) {
+ register u32 r8 asm("r7") = nr;
+ register u32 r0 asm("r0");
+@@ -115,6 +118,7 @@
+ #define __internal_syscall6(n, a1, a2, a3, a4, a5, a6) \
+ (__internal_syscall)(n, (u32)(a1), (long)(a2), (long)(a3), (long)(a4), \
+ (u32)(a5), (long)(a6))
++#pragma GCC pop_options
+
+ #define __SYSCALL_NARGS_X(a1, a2, a3, a4, a5, a6, a7, a8, n, ...) n
+ #define __SYSCALL_NARGS(...) \