diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 9d4ae0ba5061..2ccd19e28898 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -522,7 +522,7 @@ #define SANITIZER_INTERCEPT_GETMNTINFO (SI_NETBSD || SI_FREEBSD || SI_MAC) #define SANITIZER_INTERCEPT_MI_VECTOR_HASH SI_NETBSD #define SANITIZER_INTERCEPT_GETVFSSTAT SI_NETBSD -#define SANITIZER_INTERCEPT_REGEX (SI_NETBSD || SI_FREEBSD) +#define SANITIZER_INTERCEPT_REGEX (SI_NETBSD || SI_FREEBSD || SI_LINUX) #define SANITIZER_INTERCEPT_REGEXSUB SI_NETBSD #define SANITIZER_INTERCEPT_FTS (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_SYSCTL (SI_NETBSD || SI_FREEBSD || SI_MAC) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index a383ebf9f3f3..4403c245bdc3 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -45,6 +45,7 @@ #include #include #include +#include #if !SANITIZER_MAC #include #endif @@ -189,6 +190,8 @@ namespace __sanitizer { unsigned struct_tms_sz = sizeof(struct tms); unsigned struct_sigevent_sz = sizeof(struct sigevent); unsigned struct_sched_param_sz = sizeof(struct sched_param); + unsigned struct_regex_sz = sizeof(regex_t); + unsigned struct_regmatch_sz = sizeof(regmatch_t); #if SANITIZER_MAC && !SANITIZER_IOS diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index f51644e3c9a6..3c8c80021a58 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -49,6 +49,8 @@ namespace __sanitizer { extern unsigned struct_sigevent_sz; extern unsigned struct_sched_param_sz; extern unsigned struct_statfs64_sz; + extern unsigned struct_regex_sz; + extern unsigned struct_regmatch_sz; #if !SANITIZER_ANDROID extern unsigned struct_statfs_sz; diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/regex.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/regex.cc index a6f19f39bf9a..3727f01325f8 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/regex.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/regex.cc @@ -1,6 +1,6 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s // -// UNSUPPORTED: linux, darwin, solaris +// UNSUPPORTED: darwin, solaris #include #include