Commit c7cc6699 authored by Marshall Clow's avatar Marshall Clow
Browse files

Do the math in uniform_int_distribution::operator() as unsigned to prevent UB...

Do the math in uniform_int_distribution::operator() as unsigned to prevent UB when overflowing. Also add a UBSAN notification that we're ffine with unsigned overflow. This fixes PR#32617. Thanks to Vincent & Christoph for their help with this issue.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343996 91177308-0d34-0410-b5e6-96231b3b80d8
parent 6735cca7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment