summaryrefslogtreecommitdiff
path: root/system/gcc/402-libsanitizer-utmp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/gcc/402-libsanitizer-utmp.patch')
-rw-r--r--system/gcc/402-libsanitizer-utmp.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/system/gcc/402-libsanitizer-utmp.patch b/system/gcc/402-libsanitizer-utmp.patch
new file mode 100644
index 000000000..7929cd8b9
--- /dev/null
+++ b/system/gcc/402-libsanitizer-utmp.patch
@@ -0,0 +1,75 @@
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.old 2018-05-31 09:58:32.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-06-27 08:52:53.520080465 +0000
+@@ -43,9 +43,6 @@
+ #include <termios.h>
+ #include <time.h>
+ #include <wchar.h>
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+-#include <utmp.h>
+-#endif
+
+ #if !SANITIZER_IOS
+ #include <net/route.h>
+@@ -291,9 +288,6 @@
+ int shmctl_shm_stat = (int)SHM_STAT;
+ #endif
+
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+- unsigned struct_utmp_sz = sizeof(struct utmp);
+-#endif
+ #if !SANITIZER_ANDROID
+ unsigned struct_utmpx_sz = sizeof(struct utmpx);
+ #endif
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.old 2017-10-19 11:23:59.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2019-06-27 08:53:41.114993442 +0000
+@@ -873,9 +873,6 @@
+ extern int shmctl_shm_stat;
+ #endif
+
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+- extern unsigned struct_utmp_sz;
+-#endif
+ #if !SANITIZER_ANDROID
+ extern unsigned struct_utmpx_sz;
+ #endif
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc.old 2017-10-19 11:23:59.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc 2019-06-27 08:54:20.530780618 +0000
+@@ -6106,38 +6106,7 @@
+
+ // FIXME: add other *stat interceptor
+
+-#if SANITIZER_INTERCEPT_UTMP
+-INTERCEPTOR(void *, getutent, int dummy) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutent, dummy);
+- void *res = REAL(getutent)(dummy);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-INTERCEPTOR(void *, getutid, void *ut) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutid, ut);
+- void *res = REAL(getutid)(ut);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-INTERCEPTOR(void *, getutline, void *ut) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutline, ut);
+- void *res = REAL(getutline)(ut);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-#define INIT_UTMP \
+- COMMON_INTERCEPT_FUNCTION(getutent); \
+- COMMON_INTERCEPT_FUNCTION(getutid); \
+- COMMON_INTERCEPT_FUNCTION(getutline);
+-#else
+ #define INIT_UTMP
+-#endif
+
+ #if SANITIZER_INTERCEPT_UTMPX
+ INTERCEPTOR(void *, getutxent, int dummy) {