mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
Fixed a problem in the JIT memory allocator where
allocations of executable memory would not be padded to account for the size of the allocation header. This resulted in undersized allocations, meaning that when the allocation was written to later the next allocation's header would be corrupted. llvm-svn: 161984
This commit is contained in:
parent
7513042c0c
commit
de18bba4c8
@ -461,6 +461,9 @@ namespace {
|
||||
/// allocateCodeSection - Allocate memory for a code section.
|
||||
uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
|
||||
unsigned SectionID) {
|
||||
// Grow the required block size to account for the block header
|
||||
Size += sizeof(*CurBlock);
|
||||
|
||||
// FIXME: Alignement handling.
|
||||
FreeRangeHeader* candidateBlock = FreeMemoryList;
|
||||
FreeRangeHeader* head = FreeMemoryList;
|
||||
|
Loading…
Reference in New Issue
Block a user