Author: marshall Date: Mon Sep 11 11:10:33 2017 New Revision: 312932 URL: http://llvm.org/viewvc/llvm-project?rev=312932&view=rev Log: mark mersenne_twister_engine<>::seed(result_type __sd) with _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK to placate UBSAN. Fixes PR#34160
Modified: libcxx/trunk/include/random Modified: libcxx/trunk/include/random URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/random?rev=312932&r1=312931&r2=312932&view=diff ============================================================================== --- libcxx/trunk/include/random (original) +++ libcxx/trunk/include/random Mon Sep 11 11:10:33 2017 @@ -2308,6 +2308,7 @@ template <class _UIntType, size_t __w, s void mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(result_type __sd) + _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { // __w >= 2 __x_[0] = __sd & _Max; for (size_t __i = 1; __i < __n; ++__i) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits