With a few code change like `for (size_t i = size - 1; i < size; i--)` to `for 
(size_t i = size - 1; i < size; i-=2)` it become infinite loop when size == 
size_t.high. Because when `i` wraparound from 0 to 0xfffffffe, this loop still 
continues because `0xfffffffe < 0xffffffff` is true.

Here is example C++ code:
    
    
    #include <iostream>
    
    int main() {
      uint32_t size = 0xffffffff;
      
      for(uint32_t i = size - 1; i < size; i -= 2);
      
      std::cout << "finished\n";
    }
    
    Run

Reply via email to