Ver Fonte

Fix address space allocator slow path to avoid OOB

Kelebek1 há 3 anos atrás
pai
commit
6fed48b3a4
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/common/address_space.inc

+ 1 - 1
src/common/address_space.inc

@@ -336,7 +336,7 @@ ALLOC_MEMBER(VaType)::Allocate(VaType size) {
             ASSERT_MSG(false, "Unexpected allocator state!");
         }
 
-        auto search_predecessor{this->blocks.begin()};
+        auto search_predecessor{std::next(this->blocks.begin())};
         auto search_successor{std::next(search_predecessor)};
 
         while (search_successor != this->blocks.end() &&