diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-03-12 15:54:24 +0000 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-03-13 10:25:33 +0000 |
commit | bf008fc9da20f67803cbae7504e85b17f038579b (patch) | |
tree | 0c9a6dd4a9294a492c6c6a8f617d369d81c34963 | |
parent | 1231f8ccab16708e97375ab7e2f6c85dc059f434 (diff) | |
download | klee-bf008fc9da20f67803cbae7504e85b17f038579b.tar.gz |
Renamed --red-zone-space to --redzone-size and improved help message
-rw-r--r-- | lib/Core/MemoryManager.cpp | 11 |
1 files 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<bool> NullOnZeroMalloc( llvm::cl::desc("Returns NULL if malloc(0) is called (default=false)"), llvm::cl::init(false), llvm::cl::cat(MemoryCat)); -llvm::cl::opt<unsigned> 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<unsigned> 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<unsigned long long> 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.", |