Heap management for memory corruption detection
First Claim
1. A processor, comprising:
- a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and
a processor core coupled to the memory, wherein the processing core is operable to;
receive an allocation request, from the application, for allocation of a memory object having one or more contiguous memory blocks in the memory;
generate a first memory corruption detection (MCD) identifier (ID) for the memory object;
associate the first MCD ID with the one or more contiguous memory blocks of the memory object;
allocate the memory object in the memory starting at a first memory address;
store the first MCD ID into an entry for the one or more contiguous memory blocks in the MCD table;
create a first pointer to the memory object, the first pointer including the first memory address;
store the first MCD ID associated with the memory object in the first pointer;
send the first pointer to the application;
receive an access request to access the memory object, the access request including a second pointer, the second pointer including a second memory address and a second MCD ID;
compare a first MCD ID from an entry in the MCD table corresponding to the second memory address to the second MCD ID;
allow access to the memory object when the first MCD ID matches the second MCD ID; and
generate a page fault when the first MCD ID does not match the second MCD ID.
0 Assignments
0 Petitions
Accused Products
Abstract
Memory corruption detection technologies are described. A processor core of a processor can receive a first pointer produced by a first memory access instruction of an application being executed by the processor. The first pointer includes a first memory address of a first memory object and a third metadata value and the memory address identifies a memory block in the first set of one or more contiguous memory blocks. The processor core compares the third metadata value to the first metadata value and communicates a memory corruption detection message to the application when the third metadata value does not match the first metadata value. The processor core provides the first memory object to the application when the third metadata value matches the first metadata value.
-
Citations
17 Claims
-
1. A processor, comprising:
-
a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and a processor core coupled to the memory, wherein the processing core is operable to; receive an allocation request, from the application, for allocation of a memory object having one or more contiguous memory blocks in the memory; generate a first memory corruption detection (MCD) identifier (ID) for the memory object; associate the first MCD ID with the one or more contiguous memory blocks of the memory object; allocate the memory object in the memory starting at a first memory address; store the first MCD ID into an entry for the one or more contiguous memory blocks in the MCD table; create a first pointer to the memory object, the first pointer including the first memory address; store the first MCD ID associated with the memory object in the first pointer; send the first pointer to the application; receive an access request to access the memory object, the access request including a second pointer, the second pointer including a second memory address and a second MCD ID; compare a first MCD ID from an entry in the MCD table corresponding to the second memory address to the second MCD ID; allow access to the memory object when the first MCD ID matches the second MCD ID; and generate a page fault when the first MCD ID does not match the second MCD ID. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method comprising:
-
receiving an allocation request, from an application, for allocation of a memory object having one or more contiguous memory blocks in a memory, the memory comprising a memory corruption detection (MCD) table; generating a first MCD identifier (ID) for the memory object; associating the first MCD ID with the one or more contiguous memory blocks of the memory object; allocating the memory object in the memory starting at a first memory address; storing the first MCD ID into an entry for the one or more contiguous memory blocks in the MCD table; creating a first pointer to the memory object, the first pointer including the first memory address; storing the first MCD ID associated with the memory object in the first pointer; sending the first pointer to the application; receiving an access request to access the memory object, the access request including a second pointer, the second pointer including a second memory address and a second MCD ID; comparing a first MCD ID from an entry in the MCD table corresponding to the second memory address to the second MCD ID; allowing access to the memory object when the first MCD ID matches the second MCD ID; and generating a page fault when the first MCD ID does not match the second MCD ID. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. At least one tangible machine-readable medium comprising a plurality of instructions that in response to being executed by a processor cause the processor to:
-
receive an allocation request, from an application, for allocation of a memory object having one or more contiguous memory blocks in a memory, the memory comprising a memory corruption detection (MCD) table; generate a first MCD identifier (ID) for the memory object; associate the first MCD ID with the one or more contiguous memory blocks of the memory object; allocate the memory object in the memory starting at a first memory address; store the first MCD ID into an entry for the one or more contiguous memory blocks in the MCD table; create a first pointer to the memory object, the first pointer including the first memory address; store the first MCD ID associated with the memory object in the first pointer; send the first pointer to the application; receive an access request to access the memory object, the access request including a second pointer, the second pointer including a second memory address and a second MCD ID; compare a first MCD ID from an entry in the MCD table corresponding to the second memory address to the second MCD ID; allow access to the memory object when the first MCD ID matches the second MCD ID; and generate a page fault when the first MCD ID does not match the second MCD ID. - View Dependent Claims (14, 15, 16, 17)
-
Specification