diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-10-21 11:42:16 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-10-21 11:42:16 +0000 |
commit | cef7527a85d026aeb17a4dacca73c70c0ab5da40 (patch) | |
tree | 0a85fcdb02a052b1f08c226af631021cab95fc2c /include/llvm/ExecutionEngine | |
parent | e06e91122fefcadd252ddd2f2591e181683fc2f1 (diff) | |
download | external_llvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.zip external_llvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.tar.gz external_llvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.tar.bz2 |
fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r-- | include/llvm/ExecutionEngine/JITMemoryManager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/JITMemoryManager.h b/include/llvm/ExecutionEngine/JITMemoryManager.h index 0d79d14..61c3443 100644 --- a/include/llvm/ExecutionEngine/JITMemoryManager.h +++ b/include/llvm/ExecutionEngine/JITMemoryManager.h @@ -101,6 +101,9 @@ public: /// and remember where it is in case the client wants to deallocate it. virtual void endFunctionBody(const Function *F, unsigned char *FunctionStart, unsigned char *FunctionEnd) = 0; + + /// allocateSpace - Allocate a memory block of the given size. + virtual unsigned char *allocateSpace(intptr_t Size, unsigned Alignment) = 0; /// deallocateMemForFunction - Free JIT memory for the specified function. /// This is never called when the JIT is currently emitting a function. |