where starting point is test_utils::get_random_data<Type>(size, -100, 100, seed_value);
and ending point is __glibcxx_assert(_M_a <= _M_b), where _M_a = 4294967196 and _M_b = 100.
I. e. tests try to build uniform_int_distribution<unsigned int> between -100 and 100, which results in implicit conversion, which results in undefined behavior.
Some of them use unsigned short, some unsigned long long and so on. Replacing negative starting point with non-negative helps, but maybe you can provide a better solution?
Describe the bug Hi, while testing with hardened libstdc++ (compiled with
-D_GLIBCXX_ASSERTIONS
), many tests rocPRIM failed with traceback like:where starting point is
test_utils::get_random_data<Type>(size, -100, 100, seed_value);
and ending point is__glibcxx_assert(_M_a <= _M_b)
, where _M_a = 4294967196 and _M_b = 100.I. e. tests try to build
uniform_int_distribution<unsigned int>
between -100 and 100, which results in implicit conversion, which results in undefined behavior.Affected tests are:
Some of them use unsigned short, some unsigned long long and so on. Replacing negative starting point with non-negative helps, but maybe you can provide a better solution?
Environment