Opened 6 years ago
Closed 4 years ago
#12404 closed Bugs (fixed)
undefined behaviour in interval container library
Reported by: | Owned by: | Joachim Faulhaber | |
---|---|---|---|
Milestone: | To Be Determined | Component: | ICL |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: | Joachim Faulhaber |
Description
The file boost/icl/interval_bounds.hpp (line 45) contains the expression ((~_bits<<1) & _left) which invokes undefined behaviour by left shifting a negative signed integer. It can be fixed by replacing the expression with (((bound_type)~_bits<<1) & _left). This issue was detected by GCC 6.1.0 with -fsanitize=undefined.
Note:
See TracTickets
for help on using tickets.