[compiler-rt] f7347df - Revert "[sanitizer] Define 32bit uptr as uint"
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 01:08:48 PDT 2021
Author: Florian Hahn
Date: 2021-08-16T09:08:24+01:00
New Revision: f7347dfa03e55ca3837d05160b25a5e9fc1794f7
URL: https://github.com/llvm/llvm-project/commit/f7347dfa03e55ca3837d05160b25a5e9fc1794f7
DIFF: https://github.com/llvm/llvm-project/commit/f7347dfa03e55ca3837d05160b25a5e9fc1794f7.diff
LOG: Revert "[sanitizer] Define 32bit uptr as uint"
This reverts commit 45138f788c9b3c4ac5d9ae4479841c411c15190e.
It looks like this breaks building sanitizers on Darwin platforms on
Green Dragon
https://green.lab.llvm.org/green/job/clang-stage1-RA/23332/console
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.ios.dir/sanitizer_stacktrace.cpp.o
/Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/clang-build/./bin/clang++ -DHAVE_RPC_XDR_H=0 -I/Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -std=c++14 -Wno-unused-parameter -O2 -g -DNDEBUG -arch armv7 -arch armv7s -arch arm64 -arch armv7k -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -stdlib=libc++ -miphoneos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -fPIC -fno-builtin -fno-exceptions -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -g -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-format-pedantic -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.ios.dir/sanitizer_stacktrace.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.ios.dir/sanitizer_stacktrace.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.ios.dir/sanitizer_stacktrace.cpp.o -c '/Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cpp'
In file included from /Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cpp:13:
In file included from /Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h:15:
/Users/buildslave/jenkins/workspace/clang-stage1-RA at 2/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common.h:1068:14: error: 'operator new' takes type size_t ('unsigned long') as first parameter
inline void *operator new(__sanitizer::operator_new_size_type size,
^
1 error generated.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
index de06f42c3f48..056b00a10e2b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -139,13 +139,8 @@ namespace __sanitizer {
typedef unsigned long long uptr;
typedef signed long long sptr;
#else
-# if (SANITIZER_WORDSIZE == 64)
typedef unsigned long uptr;
typedef signed long sptr;
-# else
-typedef unsigned int uptr;
-typedef signed int sptr;
-# endif
#endif // defined(_WIN64)
#if defined(__x86_64__)
// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
index 385b6158300c..670e96552c68 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
@@ -71,7 +71,7 @@ void Print(const set<uptr> &s) {
#if defined(_WIN64)
fprintf(stderr, "%llu ", *it);
#else
- fprintf(stderr, "%zu ", *it);
+ fprintf(stderr, "%lu ", *it);
#endif
}
fprintf(stderr, "\n");
More information about the llvm-commits
mailing list