Disable unsigned integer sanitizer for basic_string::replace(). Patch from tomcherry@google.com
basic_string::replace() has the below line __sz += __n2 - __n1; which fails overflow checks if __n1 > __n2, as the negative result from the subtraction then overflows the original __sz when added to it. This behavior is valid as unsigned integer overflow is defined to wrap around the maximum value and that produces the correct final value for __sz. Therefore, we disable this check on this function. llvm-svn: 297355
Loading
Please register or sign in to comment