aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core/MemoryManager.h
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2016-03-22 17:16:38 +0100
committerMartin Nowack <martin@se.inf.tu-dresden.de>2016-07-08 22:54:54 +0200
commitea0c6724dc992a5358d6da3d50d9f60472d66d64 (patch)
tree63c186ee950792fb475dfda71db861d359c16efb /lib/Core/MemoryManager.h
parentf4363713c97769f392b7d85c4782f6e1aeb1a137 (diff)
downloadklee-ea0c6724dc992a5358d6da3d50d9f60472d66d64.tar.gz
Handle aligned varargs allignment correctly
For vararg handling, arguments of size bigger than 64 bit need to be handled 128bit aligned according to AMD calling conventions AMD64-ABI 3.5.7p5. To handle that case correctly, we do: 1) make sure that every argument is aligned correctly in an allocation for function arguments 2) the allocation itself is aligned correctly
Diffstat (limited to 'lib/Core/MemoryManager.h')
-rw-r--r--lib/Core/MemoryManager.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Core/MemoryManager.h b/lib/Core/MemoryManager.h
index 01683443..d80e44af 100644
--- a/lib/Core/MemoryManager.h
+++ b/lib/Core/MemoryManager.h
@@ -31,8 +31,12 @@ namespace klee {
MemoryManager(ArrayCache *arrayCache) : arrayCache(arrayCache) {}
~MemoryManager();
+ /**
+ * Returns memory object which contains a handle to real virtual process
+ * memory.
+ */
MemoryObject *allocate(uint64_t size, bool isLocal, bool isGlobal,
- const llvm::Value *allocSite);
+ const llvm::Value *allocSite, size_t alignment = 8);
MemoryObject *allocateFixed(uint64_t address, uint64_t size,
const llvm::Value *allocSite);
void deallocate(const MemoryObject *mo);