boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

Invalid iterator increment/decrement in the last iteration of adaptive_sort_combine_blocks #26

Closed igaztanaga closed 5 years ago

igaztanaga commented 5 years ago

In a left/right merge, combined_first is always increased/decreased the regular size:

combined_first += l_reg_combined

combined_first -= l_reg_combined

This is invalid when the last iteration is not regular. The problem shows up when using stable_vector::iterators, which crash when incremented out of bounds.