US5953530A
Expired / Lapsed
US
⏱️ 0.0 years remaining
Method and apparatus for run-time memory access checking and memory leak detection of a multi-threaded program
Assignee: Sun Microsystems Inc
•
Filing: 1997-11-25
•
Granted: 1999-09-14
•
Expires: 2017-11-25
Abstract
Abstract The present invention is a system and method for a "debugger Run-Time-Checking for valid memory accesses for multi-threaded application programs" (hereinafter "RTC/MT") wherein a run-time process which includes multiple threads running either serially or concurrently, may be monitored by a debugger program and memory access errors detected and correctly attributed to the process thread encountering the error. The RTC/MT system of the present invention also provides an apparatus and method which monitors and reports memory leaks as required for multi-threaded target programs.
Inventors
- 👤 Alok Rishi
- 👤 Jon A. Masamitsu
Bibliographic Details
Application Number
—
Jurisdiction
US
Data Source
google_patents
Last Synchronized
2026-11-01 08:17
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/36; G06F11/362; G06F11/366; G06F11/3636; G06F11/3644
Claims Analysis
Total Claims: 30
Claim 1
Independent Claim
225 words
A method for memory access checking of a multi-threaded target program, said method executable on a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said computer system having program machine instructions in said memory, said computer system also having a multi--threaded operating system, said method comprising the steps of: providing a multi--threaded safe ("MT safe") debugger program having memory access checking facilities, where being "multi-threaded safe" means that the debugger program itself is capable of handling multiple accesses of its routines in a safe way, and wherein the MT safe debugger program can operate in conjunction with said multi-threaded operating system; providing memory status information for memory locations in said memory, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe debugger program; and under the control of said computer system, said MT safe debugger program checking said memory status information for each memory location accessed by said multi-threaded target program.
Claim 2
Independent Claim
225 words
A method for memory access checking of a multi-threaded target program, said method executable on a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said computer system having program machine instructions in said memory, said computer system also having a multi--threaded operating system, said method comprising the steps of: providing a multi--threaded safe ("MT safe") debugger program having memory access checking facilities, where being "multi-threaded safe" means that the debugger program itself is capable of handling multiple accesses of its routines in a safe way, and wherein the MT safe debugger program can operate in conjunction with said multi-threaded operating system; providing memory status information for memory locations in said memory, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe debugger program; and under the control of said computer system, said MT safe debugger program checking said memory status information for each memory location accessed by said multi-threaded target program.
Claim 3
Dependent Claim
50 words
The method of claim 1 wherein said MT safe debugger program maintains said memory status information in a multi-threaded safe manner by using synchronization primitives to lock-out concurrent accesses to it until said memory status is updated or checked for a current thread, after which time said accesses are unlocked.
Claim 4
Dependent Claim
30 words
The method of claim 1 wherein said checking for an error when said status information for said memory location accessed indicates an unallocated state is done on a per-thread basis.
Claim 5
Dependent Claim
26 words
The method of claim 1 comprising the additional step of reporting an error if said status information for said memory location accessed indicates an unallocated state.
Claim 6
Dependent Claim
30 words
The method of claim 4 wherein said reporting of an error when said status information for said memory location accessed indicates an unallocated state is done on a per-thread basis.
Claim 7
Dependent Claim
108 words
The method of claim 1 comprising the additional steps of: providing memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not, wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said multi-threaded target computer program, said memory leak status information being maintained by said MT safe debugger program; and under the control of said computer system, said MT safe debugger program checking said memory leak status information and reporting said memory locations designated as in said inaccessible state.
Claim 8
Dependent Claim
44 words
The method of claim 1 wherein said memory accesses may be either a read access or a write access and wherein said memory status information maintained by said MT safe debugger program comprises allocated states designated as read-only, write-only, and read or write access.
Claim 9
Independent Claim
176 words
A method for memory leak checking of a multi-threaded target program, said method executable on a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said computer system having program machine instructions in said memory, said computer system also having a multi-threaded operating system, said method comprising the steps of: providing a multi-threaded safe ("MT safe") debugger program having memory leak checking facilities, which can operate in conjunction with said multi--threaded operating system; providing memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said computer program, said leak status information being maintained by said MT safe debugger program; and under the control of said computer system, checking said memory leak status information.
Claim 10
Independent Claim
176 words
A method for memory leak checking of a multi-threaded target program, said method executable on a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said computer system having program machine instructions in said memory, said computer system also having a multi-threaded operating system, said method comprising the steps of: providing a multi-threaded safe ("MT safe") debugger program having memory leak checking facilities, which can operate in conjunction with said multi--threaded operating system; providing memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said computer program, said leak status information being maintained by said MT safe debugger program; and under the control of said computer system, checking said memory leak status information.
Claim 11
Dependent Claim
32 words
The method for memory leak checking of a multi-threaded target program of claim 8 having an additional step of reporting to a user said memory locations designated as in an inaccessible state.
Claim 12
Dependent Claim
257 words
A computer system for memory access checking of a multi-threaded target program, one or more central processing units (CPUs) and having program machine said computer system comprising: a memory; a clock; at least one central processing unit; a plurality of program machine instructions loaded into said memory; a multi-threaded operating system loaded into said memory; at least one I/O device for receiving inputs; at least one I/O device for sending outputs to; at least one of peripheral device; a multi-threaded safe ("MT safe") debugger program having memory access checking facilities, loaded into said memory and coupled to said multi-threaded operating system; a multi-threaded target program loaded into said memory under control of said MT safe debugger; one of said one or more CPUs for executing said multi-threaded operating system and said MT safe debugger to test said multi-threaded target program, said MT safe debugger having a first machine executable mechanism which provides memory status information for memory locations in said memory, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe debugger program during said test of said multi-threaded target program; and said MT safe debugger having a second machine executable mechanism which checks said memory status information for each memory location accessed by said multi-threaded target program.
Claim 13
Dependent Claim
257 words
A computer system for memory access checking of a multi-threaded target program, one or more central processing units (CPUs) and having program machine said computer system comprising: a memory; a clock; at least one central processing unit; a plurality of program machine instructions loaded into said memory; a multi-threaded operating system loaded into said memory; at least one I/O device for receiving inputs; at least one I/O device for sending outputs to; at least one of peripheral device; a multi-threaded safe ("MT safe") debugger program having memory access checking facilities, loaded into said memory and coupled to said multi-threaded operating system; a multi-threaded target program loaded into said memory under control of said MT safe debugger; one of said one or more CPUs for executing said multi-threaded operating system and said MT safe debugger to test said multi-threaded target program, said MT safe debugger having a first machine executable mechanism which provides memory status information for memory locations in said memory, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe debugger program during said test of said multi-threaded target program; and said MT safe debugger having a second machine executable mechanism which checks said memory status information for each memory location accessed by said multi-threaded target program.
Claim 14
Dependent Claim
30 words
The computer system of claim 10 further comprising a reporting mechanism for reporting of an error when said status information for said accessed memory locations are in an unallocated state.
Claim 15
Dependent Claim
31 words
The computer system of claim 10 wherein said checking for an error when said status information for said memory location accessed indicates an unallocated state is done on a per-thread basis.
Claim 16
Dependent Claim
31 words
The computer system of claim 11 wherein said reporting of an error when said status information for said memory location accessed indicates an unallocated state is done on a per-thread basis.
Claim 17
Dependent Claim
45 words
The computer system of claim 10 wherein said memory accesses may be either a read access or a write access and wherein said memory status information maintained by said MT safe debugger program comprises allocated states designated as read-only, write-only, and read or write access.
Claim 18
Dependent Claim
31 words
The computer system of claim 10 wherein said checking for an error if said status information for said memory location accessed indicates an unallocated state is done on a per-thread basis.
Claim 19
Dependent Claim
105 words
The computer system of claim 10 further comprising: a third machine executable mechanism coupled to said MT safe debugger which provides memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said computer program, said memory leak status information being maintained by said MT safe debugger program; and a fourth machine executable mechanism coupled to said MT safe debugger which checks said memory leak status information.
Claim 20
Dependent Claim
22 words
The computer system of claim 16 further comprising a reporting mechanism for reporting said memory locations designated as in an inaccessible state.
Claim 21
Dependent Claim
228 words
A computer system, comprising: a memory; a clock; at least one central processing unit; a plurality of program machine instructions loaded into said memory; a multi-threaded operating system loaded into said memory; at least one I/O device for receiving inputs; at least one I/O device for sending outputs to; at least one peripheral device; a multi--threaded safe ("MT safe") debugger program having memory leak checking facilities, loaded into said memory and coupled to said multi-threaded operating system; a multi-threaded target program loaded into said memory under control of said MT safe debugger; one of said one or more CPUs for executing said multi-threaded operating system and said MT safe debugger to test said multi-threaded target program, said MT safe debugger having a first machine executable mechanism which provides memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said computer program, said leak status information being maintained by said MT safe debugger program during said test of said multi-threaded target program; and said MT safe debugger having a second machine executable mechanism which checks said memory leak status information for each memory location accessed by said multi-threaded target program.
Claim 22
Dependent Claim
228 words
A computer system, comprising: a memory; a clock; at least one central processing unit; a plurality of program machine instructions loaded into said memory; a multi-threaded operating system loaded into said memory; at least one I/O device for receiving inputs; at least one I/O device for sending outputs to; at least one peripheral device; a multi--threaded safe ("MT safe") debugger program having memory leak checking facilities, loaded into said memory and coupled to said multi-threaded operating system; a multi-threaded target program loaded into said memory under control of said MT safe debugger; one of said one or more CPUs for executing said multi-threaded operating system and said MT safe debugger to test said multi-threaded target program, said MT safe debugger having a first machine executable mechanism which provides memory leak status information for memory locations in said memory, said memory leak status information indicating at least whether a memory location is in an inaccessible state or not wherein said inaccessible state corresponds to a memory location which is in an allocated state but which is inaccessible in said computer program, said leak status information being maintained by said MT safe debugger program during said test of said multi-threaded target program; and said MT safe debugger having a second machine executable mechanism which checks said memory leak status information for each memory location accessed by said multi-threaded target program.
Claim 23
Dependent Claim
36 words
The computer system of claim 18 wherein said second machine executable mechanism which checks said memory leak status information for each memory location accessed by said multi-threaded target program performs said checking on a per-thread basis.
Claim 24
Dependent Claim
32 words
The computer system of claim 18 further comprising a reporting mechanism for reporting of said memory locations which are designated as in an inaccessible state, said inaccessible locations designated as memory leaks.
Claim 25
Dependent Claim
34 words
The computer system of claim 20 wherein said reporting mechanism which reports said memory leak status information for each memory location accessed by said multi-threaded target program performs said reporting on a per-thread basis.
Claim 26
Dependent Claim
168 words
A debugger in a computer readable medium for providing a multithreaded safe ("MT safe") mechanism for run-time-checking ("RTC") a multi-threaded target program, said debugger operating in a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said debugger comprising: a first machine executable structure for maintaining status of memory locations in a computer system, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe mechanism during a test of said multi-threaded target program; and a second machine executable structure which checks said memory status information for each memory location accessed by said multi-threaded target program.
Claim 27
Dependent Claim
168 words
A debugger in a computer readable medium for providing a multithreaded safe ("MT safe") mechanism for run-time-checking ("RTC") a multi-threaded target program, said debugger operating in a computer system having a memory, a clock, one or more central processing units (CPUs), an I/O device for receiving inputs, an I/O device for sending outputs to, and at least one peripheral device, said debugger comprising: a first machine executable structure for maintaining status of memory locations in a computer system, said memory status information indicating at least whether a memory location is in an allocated state or in an unallocated state, wherein said allocated state corresponds to a memory location allocated by a computer program and said unallocated state corresponds to a memory location not allocated by said computer program, said status information being maintained by said MT safe mechanism during a test of said multi-threaded target program; and a second machine executable structure which checks said memory status information for each memory location accessed by said multi-threaded target program.
Claim 28
Dependent Claim
35 words
A debugger as articulated in claim 22 wherein said second machine executable structure performs said checks of said memory status information for each memory location accessed by said multi-threaded target program on a per-thread basis.
Claim 29
Dependent Claim
41 words
A debugger as articulated in claim 22 further comprising a reporting mechanism for reporting an error if said status information for said memory location accessed indicates an unallocated state, said second machine executable structure under control of said MT safe mechanism.
Claim 30
Dependent Claim
33 words
A debugger as articulated in claim 24 wherein said reporting mechanism performs said reporting of said memory status information for each memory location accessed by said multi-threaded target program on a per-thread basis.
References Cited (Backward Citations)
USPTO Annuity & Maintenance Windows
| Annuity Stage | Window Opens | Payment Deadline | Surcharge Period Until | Estimated Fee | Status |
|---|---|---|---|---|---|
| 3.5 Years (Year 4) | 2002-09-13 | 2003-03-15 | 2003-09-14 | $2000.00 | Window Closed / Lapsed |
| 7.5 Years (Year 8) | 2006-09-13 | 2007-03-15 | 2007-09-14 | $3760.00 | Window Closed / Lapsed |
| 11.5 Years (Year 12) | 2010-09-13 | 2011-03-15 | 2011-09-14 | $7700.00 | Window Closed / Lapsed |