Skip to content

Commit 5b23f2d

Browse files
authored
__config: also ignore shift-out-of-bounds error with ubsan checks
Otherwise functions such as __hash_len_16 in hash.h still trigger harmless but frustrating ubsan warnings despite being marked as _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK.
1 parent 4f02965 commit 5b23f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ typedef __char32_t char32_t;
11551155

11561156
// Allow for build-time disabling of unsigned integer sanitization
11571157
# if __has_attribute(no_sanitize) && !defined(_LIBCPP_COMPILER_GCC)
1158-
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
1158+
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow", "shift-out-of-bounds")))
11591159
# else
11601160
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
11611161
# endif

0 commit comments

Comments
 (0)