Opened 6 years ago

Closed 4 years ago

#12404 closed Bugs (fixed)

undefined behaviour in interval container library

Reported by: Hannu Rummukainen <hannu.rummukainen@…> 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.

Change History (1)

comment:1 by Joachim Faulhaber, 4 years ago

Cc: Joachim Faulhaber added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.