Subject: [Boost-bugs] [Boost C++ Libraries] #12404: undefined behaviour in interval container library
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-21 12:34:28
#12404: undefined behaviour in interval container library
-----------------------------------------------------+---------------------
Reporter: Hannu Rummukainen <hannu.rummukainen@â¦> | Owner: jofaber
Type: Bugs | Status: new
Milestone: To Be Determined | Component: ICL
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
-----------------------------------------------------+---------------------
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12404> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC