[Boost-bugs] [Boost C++ Libraries] #8568: Infinite loop in hash_value_signed/hash_value_unsigned

Subject: [Boost-bugs] [Boost C++ Libraries] #8568: Infinite loop in hash_value_signed/hash_value_unsigned
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-13 17:52:01


#8568: Infinite loop in hash_value_signed/hash_value_unsigned
---------------------------------+------------------------------------------
 Reporter: alex@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: functional
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 Visual C++ 2012 static analysis found these two infinite loop warnings in
 hash.hpp:


 {{{
 for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
 {
     seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2);
 }
 }}}

 Warning message:

 {{{
 hash.hpp(156): warning : C6295: Ill-defined for-loop: 'unsigned int'
 values are always of range '0' to '4294967295'. Loop executes infinitely.
 hash.hpp(176): warning : C6295: Ill-defined for-loop: 'unsigned int'
 values are always of range '0' to '4294967295'. Loop executes infinitely.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8568>
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:13 UTC