File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1156,8 +1156,10 @@ typedef __char32_t char32_t;
1156
1156
// Allow for build-time disabling of unsigned integer sanitization
1157
1157
# if __has_attribute(no_sanitize) && !defined(_LIBCPP_COMPILER_GCC)
1158
1158
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__ ((__no_sanitize__(" unsigned-integer-overflow" )))
1159
+ # define _LIBCPP_DISABLE_UBSAN_INTEGER_CHECK (reason ) __attribute__((__no_sanitize__(" integer" )))
1159
1160
# else
1160
1161
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
1162
+ # define _LIBCPP_DISABLE_UBSAN_INTEGER_CHECK (reason )
1161
1163
# endif
1162
1164
1163
1165
# if __has_feature(nullability)
Original file line number Diff line number Diff line change @@ -132,11 +132,13 @@ struct __murmur2_or_cityhash<_Size, 64> {
132
132
static const _Size __k2 = 0x9ae16a3b2f90404fULL ;
133
133
static const _Size __k3 = 0xc949d7c7509e6557ULL ;
134
134
135
- _LIBCPP_HIDE_FROM_ABI static _Size __rotate (_Size __val, int __shift) {
135
+ _LIBCPP_HIDE_FROM_ABI static _Size _LIBCPP_DISABLE_UBSAN_INTEGER_CHECK (" shifting can cause unsigned overflow" )
136
+ __rotate(_Size __val, int __shift) {
136
137
return __shift == 0 ? __val : ((__val >> __shift) | (__val << (64 - __shift)));
137
138
}
138
139
139
- _LIBCPP_HIDE_FROM_ABI static _Size __rotate_by_at_least_1 (_Size __val, int __shift) {
140
+ _LIBCPP_HIDE_FROM_ABI static _Size _LIBCPP_DISABLE_UBSAN_INTEGER_CHECK (" shifting can cause unsigned overflow" )
141
+ __rotate_by_at_least_1(_Size __val, int __shift) {
140
142
return (__val >> __shift) | (__val << (64 - __shift));
141
143
}
142
144
You can’t perform that action at this time.
0 commit comments