boostorg / icl

Boost.org icl module
http://boost.org/libs/icl
10 stars 44 forks source link

Fix runtime error #12

Closed tinloaf closed 7 years ago

tinloaf commented 7 years ago

This fixes undefined behavior, which is reported when compiled with -fsanitize=undefined.

The ~ operator results in an integer promotion of _bits, with the result being negative. The following shift results in undefined behavior. Casting to bound_type solves this issue.

I think I successfully ran all unit tests. The jamfile automatically executes them, right?

tinloaf commented 7 years ago

D'Oh. I didn't see #11. That was stupid.