operators_test invokes undefined behavior in random input tests
- Dominant language
- C++
- Stars
- 51
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
The [random input tests](https://github.com/boostorg/utility/blob/3f51807f24c9132d673abcaf02f288d9bf592825/test/operators_test.cpp#L619-L641) of operators_test.cpp invokes undefined behavior such as shifting integers for more than the left operand capacity or signed integer overflows in arithmetic tests. These issues are flagged by UBSAN.
Currently, I have disabled these tests under UBSAN as a workaround to keep UBSAN otherwise enabled. However, the tests as they are are invalid. I'm not sure of the purpose of this series of tests and whether the random input is essential in some regard, so I decided to not remove the tests straight away. But the tests need to be corrected.
CC: @d-frey
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.