[compiler-rt] 9a04710 - [NFC][sanitizer] Format dn_expand interceptor
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 21:21:33 PDT 2022
Author: Vitaly Buka
Date: 2022-07-06T21:21:17-07:00
New Revision: 9a04710b57fec3569c9f2984082fb5105722d144
URL: https://github.com/llvm/llvm-project/commit/9a04710b57fec3569c9f2984082fb5105722d144
DIFF: https://github.com/llvm/llvm-project/commit/9a04710b57fec3569c9f2984082fb5105722d144.diff
LOG: [NFC][sanitizer] Format dn_expand interceptor
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 60537018b8894..c6d42cac5ee40 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -2531,30 +2531,30 @@ INTERCEPTOR(int, __b64_pton, char const *src, char *target, SIZE_T targsize) {
#endif // SANITIZER_INTERCEPT___B64_TO
#if SANITIZER_INTERCEPT___DN_EXPAND
-#if __GLIBC_PREREQ(2, 34)
+# if __GLIBC_PREREQ(2, 34)
// Changed with https://sourceware.org/git/?p=glibc.git;h=640bbdf
-#define DN_EXPAND_INTERCEPTOR_NAME dn_expand
-#else
-#define DN_EXPAND_INTERCEPTOR_NAME __dn_expand
-#endif
- INTERCEPTOR(int, DN_EXPAND_INTERCEPTOR_NAME, unsigned char const *base,
- unsigned char const *end, unsigned char const *src, char *dest,
- int space) {
- void *ctx;
- COMMON_INTERCEPTOR_ENTER(ctx, DN_EXPAND_INTERCEPTOR_NAME, base, end, src, dest, space);
+# define DN_EXPAND_INTERCEPTOR_NAME dn_expand
+# else
+# define DN_EXPAND_INTERCEPTOR_NAME __dn_expand
+# endif
+INTERCEPTOR(int, DN_EXPAND_INTERCEPTOR_NAME, unsigned char const *base,
+ unsigned char const *end, unsigned char const *src, char *dest,
+ int space) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, DN_EXPAND_INTERCEPTOR_NAME, base, end, src,
+ dest, space);
// TODO: add read check if __dn_comp intercept added
int res = REAL(DN_EXPAND_INTERCEPTOR_NAME)(base, end, src, dest, space);
if (res >= 0)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res + 1);
return res;
}
-#define INIT___DN_EXPAND \
+# define INIT___DN_EXPAND \
COMMON_INTERCEPT_FUNCTION(DN_EXPAND_INTERCEPTOR_NAME);
#else // SANITIZER_INTERCEPT___DN_EXPAND
-#define INIT___DN_EXPAND
+# define INIT___DN_EXPAND
#endif // SANITIZER_INTERCEPT___DN_EXPAND
-
#if SANITIZER_INTERCEPT_POSIX_SPAWN
template <class RealSpawnPtr>
More information about the llvm-commits
mailing list