IP Library Granted Patent US 11,966,382
Granted Patent B2
US 11,966,382 · App. 17/813,644 · Granted Apr 23, 2024

Protecting against invalid memory references

Inventors: Richard H. Boivie (Monroe, CT); Tong Chen (Yorktown Heights, NY); Alper Buyuktosunoglu (White Plains, NY); Gururaj Saileshwar (Atlanta, GA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F16/2365G06F16/2282
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,966,382
App. No.
17/813,644
Granted
Apr 23, 2024
Kind
B2
Abstract

Techniques facilitating hardware-based memory-error mitigation for heap-objects. In one example, a system can comprise a process that executes computer executable components stored in a non-transitory computer readable medium. The computer executable components comprise: an entry component; and a re-purpose component. The entry component can allocate an entry in a table to store bounds-information when an object is allocated in memory. The re-purpose component can re-purpose unused bits of an object address to store an index to the table entry.

Claims (36)

1. A system, comprising:

a memory device that stores computer executable components; and

a processor that executes the computer-executable components stored in the memory device, wherein the computer executable components comprise:

a check component that:

intercepts an instruction comprising an object pointer, wherein the object pointer comprises first bits specifying an address of an object, and second bits specifying an index to an entry in a table, and wherein the entry in the table comprises bounds-information for the object; and

executes bounds-checking to validate the address according to the bounds-information by extracting the index from the object pointer to access the bounds-information for comparison against the address to determine whether the address is valid.

2. The system of claim 1 , further comprising:

a re-purpose component that:

determines unused bits of the object pointer specifying the address of the object, and

writes, in the unused bits, the index to the entry in the table, resulting in the second bits.

3. The system of claim 1 , wherein the bounds-checking comprises determining whether an array reference is in-bounds or out-of-bounds.

4. The system of claim 3 , wherein the bounds-checking further comprises, in response to determining that the array reference is out-of-bounds mitigating a potential memory error that would result from the array reference is out-of-bounds.

5. The system of claim 1 , further comprising a propagation component that propagates the second bits when the object pointer is copied in an assignment statement.

6. The system of claim 1 , further comprising a propagation component that propagates the second bits when the object pointer is passed as an argument in a function call.

7. The system of claim 1 , further comprising a propagation component that propagates the second bits when the object pointer is used to compute another address.

8. A computer-implemented method, comprising:

intercepting, by a processor, an instruction comprising an object pointer, wherein the object pointer comprises first bits specifying an address of an object, and second bits specifying an index to an entry in a table, and wherein the entry in the table comprises bounds-information for the object; and

executing, by the processor, bounds-checking to validate the address according to the bounds-information by extracting the index from the object pointer to access the bounds-information for comparison against the address to determine whether the address is valid.

9. The computer-implemented method of claim 8 , further comprising:

determining, by the processor, unused bits of the object pointer specifying the address of the object; and

writing, by the processor, in the unused bits, the index to the entry in the table, resulting in the second bits.

10. The computer-implemented method of claim 8 , wherein the bounds-checking comprises determining whether an array reference is in-bounds or out-of-bounds.

11. The computer-implemented method of claim 10 , wherein the bounds-checking further comprises, in response to determining that the array reference is out-of-bounds mitigating a potential memory error that would result from the array reference is out-of-bounds.

12. The computer-implemented method of claim 8 , further comprising propagating, by the processor, the second bits when the object pointer is copied in an assignment statement.

13. The computer-implemented method of claim 8 , further comprising propagating, by the processor, the second bits when the object pointer is passed as an argument in a function call.

14. The computer-implemented method of claim 8 , further comprising propagating, by the processor, the second bits when the object pointer is used to compute another address.

15. A computer program product comprising a non-transitory computer readable medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:

intercept, by the processor, an instruction comprising an object pointer, wherein the object pointer comprises first bits specifying an address of an object, and second bits specifying an index to an entry in a table, and wherein the entry in the table comprises bounds-information for the object; and

execute, by the processor, bounds-checking to validate the address according to the bounds-information by extracting the index from the object pointer to access the bounds-information for comparison against the address to determine whether the address is valid.

16. The computer program product of claim 15 , wherein the program instructions executable by the processor further cause the processor to:

determine, by the processor, unused bits of the object pointer specifying the address of the object; and

write, by the processor, in the unused bits, the index to the entry in the table, resulting in the second bits.

17. The computer program product of claim 15 , wherein the bounds-checking comprises determining whether an array reference is in-bounds or out-of-bounds.

18. The computer program product of claim 15 , wherein the program instructions executable by the processor further cause the processor to propagate the second bits when the object pointer is copied in an assignment statement.

19. The computer program product of claim 15 , wherein the program instructions executable by the processor further cause the processor to propagate the second bits when the object pointer is passed as an argument in a function call.

20. The computer program product of claim 15 , wherein the program instructions executable by the processor further cause the processor to propagate the second bits when the object pointer is used to compute another address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 20, 2022
From: BOIVIE, RICHARD H.; CHEN, TONG; BUYUKTOSUNOGLU, ALPER; SAILESHWAR, GURURAJ
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 060561/0772 →
Continuity (2)
Continuation 17071257 · Oct 15, 2020
Related Publication 20220358116A1 · Nov 10, 2022
Cited By (2)
US 12,572,473 US 12,579,071