diff options
-rw-r--r-- | include/klee/KDAlloc/allocator.h | 4 | ||||
-rw-r--r-- | include/klee/KDAlloc/suballocators/sized_regions.h | 2 | ||||
-rw-r--r-- | lib/Core/Executor.cpp | 8 | ||||
-rw-r--r-- | unittests/KDAlloc/randomtest.cpp | 12 |
4 files changed, 13 insertions, 13 deletions
diff --git a/include/klee/KDAlloc/allocator.h b/include/klee/KDAlloc/allocator.h index a0c2f162..5588d1d1 100644 --- a/include/klee/KDAlloc/allocator.h +++ b/include/klee/KDAlloc/allocator.h @@ -348,8 +348,8 @@ public: } } - LocationInfo location_info(void const *const ptr, - std::size_t const size) const noexcept { + LocationInfo locationInfo(void const *const ptr, + std::size_t const size) const noexcept { assert(*this && "Invalid allocator"); if (!ptr || reinterpret_cast<std::uintptr_t>(ptr) < 4096) { diff --git a/include/klee/KDAlloc/suballocators/sized_regions.h b/include/klee/KDAlloc/suballocators/sized_regions.h index 2fb12bf5..bb2a0b69 100644 --- a/include/klee/KDAlloc/suballocators/sized_regions.h +++ b/include/klee/KDAlloc/suballocators/sized_regions.h @@ -193,7 +193,7 @@ public: /// the beginning and end and in between any two allocations. inline LocationInfo getLocationInfo(char const *const address, std::size_t const size) const noexcept { - assert(root && "Cannot compute location_info for an empty treap"); + assert(root && "Cannot compute location info for an empty treap"); Node const *currentNode = &*root; Node const *closestPredecessor = nullptr; diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 361a4e2e..906484c6 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -4255,9 +4255,9 @@ void Executor::resolveExact(ExecutionState &state, if (MemoryManager::isDeterministic && CE) { using kdalloc::LocationInfo; auto ptr = reinterpret_cast<void *>(CE->getZExtValue()); - auto locinfo = unbound->heapAllocator.location_info(ptr, 1); - if (locinfo == LocationInfo::LI_AllocatedOrQuarantined && - locinfo.getBaseAddress() == ptr && name == "free") { + auto li = unbound->heapAllocator.locationInfo(ptr, 1); + if (li == LocationInfo::LI_AllocatedOrQuarantined && + li.getBaseAddress() == ptr && name == "free") { terminateStateOnProgramError(*unbound, "memory error: double free", StateTerminationType::Ptr, getAddressInfo(*unbound, p)); @@ -4400,7 +4400,7 @@ void Executor::executeMemoryOperation(ExecutionState &state, return; } else if (MemoryManager::isDeterministic) { using kdalloc::LocationInfo; - auto li = unbound->heapAllocator.location_info(ptr, bytes); + auto li = unbound->heapAllocator.locationInfo(ptr, bytes); if (li == LocationInfo::LI_AllocatedOrQuarantined) { // In case there is no size mismatch (checked by resolving for base // address), the object is quarantined. diff --git a/unittests/KDAlloc/randomtest.cpp b/unittests/KDAlloc/randomtest.cpp index c78746bb..4d2eca9c 100644 --- a/unittests/KDAlloc/randomtest.cpp +++ b/unittests/KDAlloc/randomtest.cpp @@ -78,16 +78,16 @@ public: auto choice = std::uniform_int_distribution<std::size_t>( 0, allocations.size() - 1)(rng); #if defined(USE_KDALLOC) - assert(allocator.location_info(allocations[choice].first, 1) == + assert(allocator.locationInfo(allocations[choice].first, 1) == klee::kdalloc::LocationInfo::LI_AllocatedOrQuarantined); - assert(allocator.location_info(allocations[choice].first, - allocations[choice].second) == + assert(allocator.locationInfo(allocations[choice].first, + allocations[choice].second) == klee::kdalloc::LocationInfo::LI_AllocatedOrQuarantined); allocator.free(allocations[choice].first, allocations[choice].second); - assert(allocator.location_info(allocations[choice].first, 1) == + assert(allocator.locationInfo(allocations[choice].first, 1) == klee::kdalloc::LocationInfo::LI_Unallocated); - assert(allocator.location_info(allocations[choice].first, - allocations[choice].second) == + assert(allocator.locationInfo(allocations[choice].first, + allocations[choice].second) == klee::kdalloc::LocationInfo::LI_Unallocated); #else free(allocations[choice].first); |