aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core/MemoryManager.cpp
diff options
context:
space:
mode:
authorMartinNowack <martin.nowack@gmail.com>2016-07-10 14:08:54 +0200
committerGitHub <noreply@github.com>2016-07-10 14:08:54 +0200
commitc1037080cb61ec6d5d8af3db97a6ad5f35d7af31 (patch)
tree6c6a287ddcc01e3cbfd180238a5bc2bbc6452749 /lib/Core/MemoryManager.cpp
parent48797d9846c38406f31e8a933a28eeef480a664d (diff)
parentc7a2c02c6bdf038c94a28a0a3f787a1b09d83a62 (diff)
downloadklee-c1037080cb61ec6d5d8af3db97a6ad5f35d7af31.tar.gz
Merge pull request #428 from MartinNowack/fix_determ_address
Fix parsing of the address for the deterministic memory area.
Diffstat (limited to 'lib/Core/MemoryManager.cpp')
-rw-r--r--lib/Core/MemoryManager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp
index 004ce090..f9f4b105 100644
--- a/lib/Core/MemoryManager.cpp
+++ b/lib/Core/MemoryManager.cpp
@@ -44,7 +44,7 @@ llvm::cl::opt<unsigned> RedZoneSpace(
"important to detect out-of-bound accesses (default=10)."),
llvm::cl::init(10));
-llvm::cl::opt<uint64_t> DeterministicStartAddress(
+llvm::cl::opt<unsigned long long> DeterministicStartAddress(
"allocate-determ-start-address",
llvm::cl::desc("Start address for deterministic allocation. Has to be page "
"aligned (default=0x7ff30000000)."),
@@ -66,12 +66,11 @@ MemoryManager::MemoryManager(ArrayCache *_arrayCache)
if (newSpace == MAP_FAILED) {
klee_error("Couldn't mmap() memory for deterministic allocations");
}
- if (expectedAddress != newSpace) {
+ if (expectedAddress != newSpace && expectedAddress != 0) {
klee_error("Could not allocate memory deterministically");
}
- klee_message("Deterministic memory allocation starting from %p",
- expectedAddress);
+ klee_message("Deterministic memory allocation starting from %p", newSpace);
deterministicSpace = newSpace;
nextFreeSlot = newSpace;
}