Skip to content

Commit 7a57c8c

Browse files
committed
Resolve already committed changes
1 parent 51128bf commit 7a57c8c

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ INTERCEPTOR(double, frexp, double x, int *exp) {
953953
#define INIT_FREXP
954954
#endif // SANITIZER_INTERCEPT_FREXP
955955

956-
#if SANITIZER_INTERCEPT_FREXPF
956+
#if SANITIZER_INTERCEPT_FREXPF_FREXPL
957957
INTERCEPTOR(float, frexpf, float x, int *exp) {
958958
void *ctx;
959959
COMMON_INTERCEPTOR_ENTER(ctx, frexpf, x, exp);
@@ -963,12 +963,6 @@ INTERCEPTOR(float, frexpf, float x, int *exp) {
963963
return res;
964964
}
965965

966-
# define INIT_FREXPF COMMON_INTERCEPT_FUNCTION(frexpf);
967-
#else
968-
# define INIT_FREXPF
969-
#endif
970-
971-
#if SANITIZER_INTERCEPT_FREXPL
972966
INTERCEPTOR(long double, frexpl, long double x, int *exp) {
973967
void *ctx;
974968
COMMON_INTERCEPTOR_ENTER(ctx, frexpl, x, exp);
@@ -978,10 +972,12 @@ INTERCEPTOR(long double, frexpl, long double x, int *exp) {
978972
return res;
979973
}
980974

981-
# define INIT_FREXPL COMMON_INTERCEPT_FUNCTION_LDBL(frexpl)
975+
#define INIT_FREXPF_FREXPL \
976+
COMMON_INTERCEPT_FUNCTION(frexpf); \
977+
COMMON_INTERCEPT_FUNCTION_LDBL(frexpl)
982978
#else
983-
# define INIT_FREXPL
984-
#endif
979+
#define INIT_FREXPF_FREXPL
980+
#endif // SANITIZER_INTERCEPT_FREXPF_FREXPL
985981

986982
#if SI_POSIX
987983
static void write_iovec(void *ctx, struct __sanitizer_iovec *iovec,
@@ -3938,11 +3934,7 @@ INTERCEPTOR(SIZE_T, wcrtomb, char *dest, wchar_t src, void *ps) {
39383934
if (res != ((SIZE_T)-1)) {
39393935
CHECK_LE(res, sizeof(local_dest));
39403936
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3941-
# if !SANITIZER_AIX
39423937
REAL(memcpy)(dest, local_dest, res);
3943-
# else
3944-
internal_memcpy(dest, local_dest, res);
3945-
# endif
39463938
}
39473939
return res;
39483940
}
@@ -3964,11 +3956,7 @@ INTERCEPTOR(int, wctomb, char *dest, wchar_t src) {
39643956
if (res != -1) {
39653957
CHECK_LE(res, sizeof(local_dest));
39663958
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3967-
# if !SANITIZER_AIX
39683959
REAL(memcpy)(dest, local_dest, res);
3969-
# else
3970-
internal_memcpy(dest, local_dest, res);
3971-
# endif
39723960
}
39733961
return res;
39743962
}
@@ -10440,8 +10428,7 @@ static void InitializeCommonInterceptors() {
1044010428
INIT_ISOC99_PRINTF;
1044110429
INIT_SETPROCTITLE;
1044210430
INIT_FREXP;
10443-
INIT_FREXPF;
10444-
INIT_FREXPL;
10431+
INIT_FREXPF_FREXPL;
1044510432
INIT_GETPWNAM_AND_FRIENDS;
1044610433
INIT_GETPWNAM_R_AND_FRIENDS;
1044710434
INIT_GETPWENT;

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
251251
#define SANITIZER_INTERCEPT___PRINTF_CHK \
252252
(SANITIZER_INTERCEPT_PRINTF && SI_GLIBC)
253253

254-
// AIX libc does not export FREXP and FREXP.
254+
// AIX libc does not export FREXP and FREXPF.
255255
#define SANITIZER_INTERCEPT_FREXP (SI_NOT_FUCHSIA && SI_NOT_AIX)
256256
#define SANITIZER_INTERCEPT_FREXPF (SI_POSIX && SI_NOT_AIX)
257257
#define SANITIZER_INTERCEPT_FREXPL SI_POSIX

0 commit comments

Comments
 (0)