Skip to content

Commit 025a443

Browse files
authored
adding missing undef silencer (simdjson#2253)
1 parent 70a68da commit 025a443

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎include/simdjson/arm64/bitmanipulation.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
3535
return input_num & (input_num-1);
3636
}
3737

38+
// We sometimes call leading_zeroes on inputs that are zero,
39+
// but the algorithms do not end up using the returned value.
40+
// Sadly, sanitizers are not smart enough to figure it out.
41+
// Applies only when SIMDJSON_PREFER_REVERSE_BITS is defined and true.
42+
// (See below.)
43+
SIMDJSON_NO_SANITIZE_UNDEFINED
3844
/* result might be undefined when input_num is zero */
3945
simdjson_inline int leading_zeroes(uint64_t input_num) {
4046
#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO

0 commit comments

Comments
 (0)