Skip to content
Commit 84a2dadc authored by Eric Fiselier's avatar Eric Fiselier
Browse files

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
parent 9a3fd875
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment