From bf008fc9da20f67803cbae7504e85b17f038579b Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 12 Mar 2019 15:54:24 +0000 Subject: Renamed --red-zone-space to --redzone-size and improved help message --- lib/Core/MemoryManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp index f98a8a34..dba90f8d 100644 --- a/lib/Core/MemoryManager.cpp +++ b/lib/Core/MemoryManager.cpp @@ -43,10 +43,11 @@ llvm::cl::opt NullOnZeroMalloc( llvm::cl::desc("Returns NULL if malloc(0) is called (default=false)"), llvm::cl::init(false), llvm::cl::cat(MemoryCat)); -llvm::cl::opt RedZoneSpace( - "red-zone-space", - llvm::cl::desc("Set the amount of free space between allocations. This is " - "important to detect out-of-bounds accesses (default=10)"), +llvm::cl::opt RedzoneSize( + "redzone-size", + llvm::cl::desc("Set the size of the redzones to be added after each " + "allocation (in bytes). This is important to detect " + "out-of-bounds accesses (default=10)"), llvm::cl::init(10), llvm::cl::cat(MemoryCat)); llvm::cl::opt DeterministicStartAddress( @@ -125,7 +126,7 @@ MemoryObject *MemoryManager::allocate(uint64_t size, bool isLocal, // This way, we make sure we have this allocation between its own red zones size_t alloc_size = std::max(size, (uint64_t)1); if ((char *)address + alloc_size < deterministicSpace + spaceSize) { - nextFreeSlot = (char *)address + alloc_size + RedZoneSpace; + nextFreeSlot = (char *)address + alloc_size + RedzoneSize; } else { klee_warning_once(0, "Couldn't allocate %" PRIu64 " bytes. Not enough deterministic space left.", -- cgit 1.4.1