Claims Analysis
Total Claims: 50
Claim 1
Independent Claim
277 words
A method for detecting the dereferencing of an invalid pointer by a software program being executed by a software generation system, said software program consisting of a source code file being tested and one or more library functions called by said source code file being tested, said software program including one or more pointers that point to memory locations, said error detection method comprising the steps of: storing pointer information on each of said pointers, said pointer information including the last known contents of said associated pointer and the valid memory range of said associated pointer; updating said pointer information each time said software generation system detects an assignment of a new value to one or more of said pointers by said software program; and implementing a run-time pointer checking subroutine each time said software generation system detects the dereferencing of a pointer by said software program, said run-time pointer checking subroutine comprising the steps of: locating said pointer information associated with said dereferenced pointer; retrieving the actual contents of said dereferenced pointer from said memory location where said pointer is stored; and testing to determine if the memory space pointed to by said actual contents of said dereferenced pointer is within said valid memory range retrieved from said associated pointer information, said testing step performed only if said actual contents of said dereferenced pointer equals said last known contents of said dereferenced pointer as recorded in said pointer information to ensure that an error is not generated if said contents of said dereferenced pointer was modified by an assignment during execution of one of said library functions that was not detected by said software generation system.
Claim 2
Independent Claim
293 words
A method for detecting the accessing of a region of allocated memory that has been deallocated by a software program being executed by a software generation system, said software program consisting of a source code file being tested and one or more library functions called by said source code file being tested. said software program including one or more pointers that point to memory locations, said region of allocated memory being accessed by dereferencing one of said pointers that point to said region of allocated memory, said error detection method comprising the steps of: storing allocation information on each of said regions of allocated memory, said allocation information including a chain list of each of said pointers that point to said region of allocated memory; storing pointer information on each of said pointers in said software program, said pointer information including a cross-reference to said allocation information if said associated pointer points to said region of allocated memory; updating said pointer information each time said software generation system detects an assignment of a new value to one or more of said pointers by said software program; updating said chain list upon each detected pointer assignment that modifies the list of pointers pointing to said region of allocated memory; retrieving said chain list from said associated allocation information if a deallocation of said corresponding region of allocated memory is detected by said software generation system; recording in said pointer information associated with each of said pointers listed in said chain list an indication that said pointer is pointing to deallocated memory space; and evaluating said associated pointer information each time a pointer is dereferenced to determine if a pointer is dereferenced while containing an indication that said pointer is pointing to deallocated memory space.
Claim 3
Independent Claim
287 words
A method for detecting the reading of an uninitialized portion of a memory region by a software program being executed by a software generation system, said software program consisting of a source code file being tested and one or more library functions called by said source code file being tested, said software program including one or more pointers that point to memory locations, said region of allocated memory being accessed by dereferencing a pointer that points to said region of allocated memory, said error detection method comprising the steps of: storing allocation information on said region of memory, said allocation information including an initialization status for each byte of memory; storing pointer information on each of said pointers in said software program, said pointer information including a cross-reference to said allocation information if said associated pointer points to said region of memory; updating said pointer information each time said software generation system detects an assignment of a new value to one or more of said pointers by said software program; updating said initialization status each time said software generation system detects that one or more of said bytes of memory are initialized by said source code file being tested by dereferencing a pointer to access said bytes of memory; performing an initialization bit vector maintenance subroutine to detect the initialization of one or more bytes of said region of memory by one of said library functions and to update said initialization status if such an initialization is detected; and evaluating said initialization status recorded in said allocation information each time a pointer is dereferenced to read one or more bytes of said region of memory to determine if all of said bytes being read have been initialized.
Claim 4
Independent Claim
192 words
A method for detecting leaks of allocated memory by a software program being executed by a software generation system, said software program consisting of a source code file being tested and one or more library functions called by said source code file being tested, said software program including one or more pointers which may point to said region of allocated memory, said error detection method comprising the steps of: storing allocation information on said region of allocated memory, said allocation information including a chain list of each of said pointers that point to said region of allocated memory; storing pointer information on each of said pointers in said software program, said pointer information including a cross-reference to said allocation information if said associated pointer points to said region of allocated memory; updating said pointer information each time said software generation system detects an assignment of a new value to one or more of said pointers by said software program; updating said chain list upon each detected pointer assignment that modifies the list of pointers pointing to said region of allocated memory; and identifying a memory leak if said chain list is empty.
Claim 5
Independent Claim
220 words
A method for deallocating a region of allocated memory by a software program being executed by a software generation system, said software program including one or more pointers that point to said region of allocated memory, said method comprising the steps of: storing allocation information for said region of allocated memory, said allocation information including a status indication and a chain list of each of said pointers that point to said region of allocated memory; storing pointer information on each of said pointers in said software program, said pointer information including a status indication and a cross-reference to said allocation information if said associated pointer points to said region of allocated memory; updating said pointer information each time said software generation system detects an assignment of a new value to one or more of said pointers by said software program; updating said chain list upon each detected pointer assignment that modifies the list of pointers pointing to said region of allocated memory; retrieving said chain list from said associated allocation information if a deallocation of said corresponding region of allocated memory is detected by said software generation system; and recording in said status indication of said pointer information associated with each of said pointers listed in said chain list an indication that said pointer is pointing to deallocated memory space.
Claim 6
Dependent Claim
57 words
The error detection method according to any of claims 1 to 4, further including the step of executing a post-execution wrapper function following execution of an associated library function that is known to create a pointer, said post-execution wrapper function performing said step of storing said pointer information for said pointer created by said associated library function.
Claim 7
Dependent Claim
109 words
The error detection method according to any of claims I to 4, further including the step of executing a post-execution wrapper function following execution of an associated library function that is known to return a pointer value for assignment to a pointer in said source code file being tested, said post- execution wrapper function performing the step of storing updated pointer information associated with said returned pointer in a pointer save stack for subsequent retrieval by said software generation system prior to said step of updating said pointer information upon said detection of said assignment of said return value to said pointer in said source code file being tested.
Claim 8
Dependent Claim
42 words
The error detection method according to claim 1, further including the step of executing a pre-execution wrapper function prior to executing an associated library function that is known to dereference a pointer, said pre-execution wrapper function initiating said run-time pointer checking subroutine.
Claim 9
Dependent Claim
43 words
The error detection method according to claim 2 or claim 3. further including the step of executing a pre-execution wrapper function prior to executing an associated library function that is known to dereference a pointer, said pre-execution wrapper function initiating said evaluating step.
Claim 10
Dependent Claim
55 words
The error detection method according to any of claims 1 to 3, further including the step of executing a pre-execution wrapper function prior to executing an associated library function that receives one or more arguments having a limited range, said pre-execution wrapper function testing to ensure that said received arguments are within said limited range.
Claim 11
Dependent Claim
98 words
The error detection method according to claim 1, wherein said pointer information further includes an indication of the status of said associated pointer and further including the step of setting said status indication in said pointer information associated with said dereferenced pointer to indicate that the value of said dereferenced pointer has been modified by an assignment during execution of one of said library functions that was not detected by said software generation system if said testing step determines that said actual contents of said dereferenced pointer does not equal said last known contents of said dereferenced pointer.
Claim 12
Dependent Claim
88 words
The error detection method according to claim 11, further including the steps of: identifying each of said pointers having a status that indicates that the value of said dereferenced pointer has been modified by an assignment during execution of one of said library functions that was not detected by said software generation system following execution of said software program; and indicating to a programmer that one or more of said library functions requires a post-execution wrapper function for detecting the modification of said pointers by said library function.
Claim 13
Dependent Claim
53 words
The error detection method according to claim 1, wherein said pointer information further includes the address of said associated pointer and wherein said step of locating said pointer information further includes the step of searching said pointer addresses included with said pointer information to identify said pointer information associated with said dereferenced pointer.
Claim 14
Dependent Claim
54 words
The error detection method according to claim 2, wherein said pointer information further includes the address of said associated pointer and wherein said evaluating step further includes the step of locating said pointer information by searching said pointer addresses included with said pointer information to identify said pointer information associated with said dereferenced pointer.
Claim 15
Dependent Claim
68 words
The error detection method according to claim 3, wherein said pointer information further includes the address of said associated pointer and wherein said evaluating step further includes the step of locating said initialization status by searching said pointer addresses included with said pointer information to identify said pointer information associated with said dereferenced pointer and retrieving said cross- reference to said allocation information which includes said initialization status.
Claim 16
Dependent Claim
126 words
The error detection method according to any of claims 1 to 3, further including the step of performing a read-time error checking process on a parse tree associated with said source code file being tested, said read-time error checking process comprising the steps of: performing a read-time pointer table updating subroutine which inserts a pointer table update command and associated characteristic information into a modified version of said parse tree for each pointer assignment that appears in said source code file being tested, said characteristic information characterizing the pointer expression being assigned to said pointer; and performing a read-time pointer checking subroutine which inserts a pointer check command into said modified parse tree for each pointer dereference that appears in said source code file being tested.
Claim 17
Dependent Claim
34 words
The error detection method according to claim 16, further including the step of performing a data flow analysis on said modified parse tree to eliminate overlapping pointer check commands from said modified parse tree.
Claim 18
Dependent Claim
30 words
The error detection method according to claim 17, wherein the results of said data flow analysis are utilized to detect at read-time the dereferencing of an illegal or uninitialized pointer.
Claim 19
Dependent Claim
22 words
The error detection method according to claim 16, further including the step of converting said modified parse tree into an internal pseudo-code.
Claim 20
Dependent Claim
107 words
The error detection method according to claim 19, further including the step of performing a run-time error checking process on said internal pseudo-code, said run-time error checking process further comprising the steps of: performing a run-time pointer table updating subroutine which performs said steps of storing and updating said pointer information upon evaluation of said pointer table update commands and associated characteristic information that were placed in said modified parse tree at read-time for each pointer assignment; and performing said run-time pointer checking subroutine upon evaluation of each of said pointer check commands that were placed in said modified parse tree at read-time for each pointer dereference.
Claim 21
Dependent Claim
111 words
The error detection method according to claim 16 as dependent on claim 2 or claim 3, further including the step of performing a run-time error checking process on said internal pseudo-code, said run-time error checking process further comprising the steps of: performing a run-time pointer table updating subroutine which performs said steps of storing and updating said pointer information upon evaluation of said pointer table update commands and associated characteristic information that were placed in said modified parse tree at read-time for each pointer assignment; and performing said evaluating step for each of said pointer check commands that were placed in said modified parse tree at read-time for each pointer dereference.
Claim 22
Dependent Claim
55 words
The error detection method according to claim 2, wherein said pointer information further includes an indication of the status of said associated pointer and wherein said step of recording an indication that said pointer is pointing to deallocated memory space sets said status indication to indicate that said region of allocated memory has been freed.
Claim 23
Dependent Claim
41 words
The error detection method according to claim 2 or claim 5, wherein said step of recording an indication that said pointer is pointing to deallocated memory space includes the step of setting said contents of said pointer to a null value.
Claim 24
Dependent Claim
34 words
The error detection method according to any of claims 2, 3 or 4, wherein said allocation information is created by executing a post- execution wrapper function following execution of an associated memory allocation function.
Claim 25
Dependent Claim
71 words
The error detection method according to claim 2 or claim 3, wherein said allocation information further includes the valid range of said region of memory and further including the step of determining if said memory space pointed to by said dereferenced pointer is within said valid range of said region of memory each time said software generation system detects that a pointer is being dereferenced to access said region of memory.
Claim 26
Dependent Claim
146 words
The error detection method according to claim 3, further including the steps of identifying all of said bytes of said memory that said compiled library function may access and marking each byte of said region of memory with a known value upon the allocation of said memory and wherein said bit vector maintenance subroutine comprises the steps of: analyzing said initialization status for all of said accessible memory to identify all of said corresponding bytes of accessible memory that is uninitialized when said library function is called; performing a first checksum on all of said accessible uninitialized memory before said library function is executed; performing a second checksum on all of said accessible uninitialized allocated memory after said library function is executed; and implementing an initialization status update routine if said first checksum does not equal said second checksum in order to update said initialization status.
Claim 27
Dependent Claim
58 words
The error detection method according to claim 26, wherein said initialization status update routine comprises the steps of: comparing the current contents of said accessible and previously uninitialized memory to said known value; identifying each byte of said region of memory that was initialized by said library function; and updating said initialization status for said identified initialized bytes.
Claim 28
Dependent Claim
172 words
The error detection method according to claim 3, further including the step of identifying all of said memory that said compiled library function may access and wherein said bit vector maintenance subroutine comprises the steps of: analyzing said initialization status for all of said accessible memory to identify all of said corresponding bytes of accessible memory that is uninitialized when said library function is called; saving all of said accessible uninitialized memory; performing a first checksum on all of said accessible uninitialized memory before said library function is executed; performing a second checksum on all of said accessible uninitialized memory after said library function is executed; and implementing an initialization status update routine if said first checksum does not equal said second checksum, said initialization status update routine comprising the steps of: comparing said saved data to the current contents of said accessible and previously uninitialized memory; identifying each byte of said region of memory that was initialized by said library function; and updating said initialization status for said identified initialized bytes.
Claim 29
Dependent Claim
52 words
The error detection method according to claim 4, wherein said pointer information further includes the address of said associated pointer and wherein said pointer information associated with a given pointer is located by searching said pointer addresses included with said pointer information to identify said pointer information associated with said given pointer.
Claim 30
Dependent Claim
81 words
The error detection method according to claim 4, further including the step of performing a read-time pointer table updating subroutine on a parse tree associated with said source code file being tested, said read-time pointer table updating subroutine inserting a pointer table update command and associated characteristic information into a modified version of said parse tree for each pointer assignment that appears in said source code file being tested, said characteristic information characterizing the pointer expression being assigned to said pointer.
Claim 31
Dependent Claim
21 words
The error detection method according to claim 30, further the step of converting said modified parse tree into an internal pseudo-code.
Claim 32
Dependent Claim
67 words
The error detection method according to claim 31, further including the step of performing a run-time pointer table updating subroutine on said internal pseudo-code, said run- time pointer table updating subroutine performing said steps of storing and updating said pointer information upon evaluation of said pointer table update commands and associated characteristic information that were placed in said modified parse tree at read-time for each pointer assignment.
Claim 33
Dependent Claim
43 words
The method according to claim 5, further including the step of evaluating said associated pointer information each time a pointer is dereferenced to determine if a pointer is dereferenced while containing a status indication that said pointer is pointing to deallocated memory space.
Claim 34
Dependent Claim
37 words
The method according to claim 5, wherein said step of recording an indication that said pointer is pointing to deallocated memory space sets said status indication to indicate that said region of allocated memory has been freed.
Claim 35
Independent Claim
190 words
A method for passing pointer information from a software program being executed by a software generation system into a function called by said software program, said passed pointer information associated with actual parameters that are pointers that are passed by said software program into said called function, said actual parameters being assigned to formal parameters within said called function, said pointer information being maintained in a pointer check table by said software generation system for each of said pointers in said software program and said called function, said method comprising the steps of: allocating a memory location for temporary storage of said passed pointer information associated with said actual parameters that are pointers; retrieving said pointer information associated with said actual parameters that are pointers from said pointer check table; storing said retrieved pointer information in said temporary memory location upon the calling of said called function by said software program; retrieving said pointer information from said temporary memory location upon the initiation of said called function; and placing said retrieved pointer information in entries in said pointer check table associated with said formal pointer parameters within said called function.
Claim 36
Independent Claim
193 words
A method for returning pointer information from a called function to a software program that has called said called function, said returned pointer information being associated with pointer values being returned by said called function, said software program being executed by a software generation system, said pointer information being maintained in a pointer check table by said software generation system for each of said pointers in said software program and said called function, said method comprising the steps of: allocating a memory location for temporary storage of said pointer information associated with said pointer values being returned by said called function; retrieving said pointer information associated with said pointer values being returned from said called function from said pointer check table; storing said retrieved pointer information in said temporary memory location upon the return of said called function to said software program; retrieving said pointer information from said temporary memory location following the return to said software program; and placing said retrieved pointer information in entries in said pointer check table associated with one or more of said pointers that are assigned said returned pointer values during subsequent execution of said software program.
Claim 37
Independent Claim
174 words
A method for performing pointer checks on a complex expression in a software program being executed by a software generation system, said conditional statement containing a plurality of instruction streams, each of said instruction streams having a pointer expression, said software program consisting of one or more pointers that point to memory locations, said software generation system maintaining pointer information on each of said pointers in said software program. said result of said complex expression being dereferenced at run-time, said pointer checking method comprising the steps of: allocating a memory location for temporary storage of pointer information; placing a command in each of said instruction streams, only one of said instruction streams being executed by said software generation system at run-time, said command causing said software generation system to retrieve said pointer information associated with said pointer in said executed instruction stream and to place said retrieved pointer information in said temporary memory location; and retrieving said pointer information from said temporary memory location upon said pointer dereferencing of said complex expression at run-time.
Claim 38
Independent Claim
134 words
A method for detecting the dereferencing of an invalid pointer by a library function being executed by a software generation system, said library function including one or more pointers that point to memory locations, said software generation system maintaining pointer information on each of said pointers, said pointer information including the valid memory range of said associated pointer, said method comprising the steps of: associating a wrapper function with said library function, said wrapper function retrieving said pointer information associated with each of said pointers that are dereferenced by said library function and determining if said memory space pointed to by the actual contents of each of said dereferenced pointers is within said valid memory range retrieved from said associated pointer information; and executing said wrapper function prior to executing said associated library function.
Claim 39
Independent Claim
94 words
A method for updating pointer information associated with a pointer that is created during execution of a library function, said library function being executed by a software generation system, said library function including one or more pointers that point to memory locations, said pointer information being maintained for each of said pointers, said method comprising the steps of: associating a wrapper function with said library function, said wrapper function storing said pointer information associated with said pointer created by said library function; and executing said wrapper function following execution of said associated library function.
Claim 40
Independent Claim
149 words
A method for updating pointer information associated with a pointer value that is returned from a library function to a source code file, said returned pointer value being assigned to a pointer in said source code, said library function and source code file being executed by a software generation system and include one or more pointers that point to memory locations, said pointer information being maintained in a pointer check table for each of said pointers, said method comprising the steps of: associating a wrapper function with said library function, said wrapper function storing said pointer information associated with said returned pointer value in a memory location; executing said wrapper function following execution of said associated library function; and retrieving said pointer information from said memory location for placement in said pointer check table upon said assignment of said returned pointer value to said pointer in said source code.
Claim 41
Independent Claim
236 words
A method of analyzing a software program to minimize the number of pointer checks performed on said software program, said software program being executed by a software generation system, said software program consisting of a source code file being tested and one or more library functions called by said source code file being tested, said software program including one or more pointers that point to memory locations, said software generation system maintaining pointer information on each of said pointers in said software program, said data flow analysis method comprising the steps of: establishing a flow set for each of said pointers in said software program: performing an analysis routine on each line of said software program, said analysis routine comprising the steps of: establishing a new flow set each time said software generation system detects an assignment of a new value to one of said pointers in said line of said software program being analyzed; marking said current flow set associated with a dereferenced pointer with an indication that said dereferenced pointer has been dereferenced in said line of said software program being analyzed; and repeating said analysis routine for each of said lines of said software program; and performing a single pointer check for each of said flow sets having one or more pointer dereferences, said pointer check having an expanded offset for each of said identified flow sets having a plurality of pointer dereferences.
Claim 42
Dependent Claim
62 words
The data flow analysis method according to claim 41, wherein said step of establishing a new flow set each time said software generation system detects an assignment of a new value to one of said pointers further includes the step of marking said new flow set with an indication of whether said pointer is being assigned a legal or an illegal value.
Claim 43
Dependent Claim
64 words
The data flow analysis method according to claim 42, further including the step of evaluating said flow sets at read-time following completion of said analysis routine to detect the dereferencing of an uninitialized pointer by determining if a flow set indicates that a pointer has been dereferenced before it has been assigned a legal value or while said dereferenced pointer contains an illegal value.
Claim 44
Dependent Claim
43 words
The data flow analysis according to claim 41, wherein said analysis routine further includes the step of marking each current flow set with an indication that said line of said software program being analyzed includes a call to one of said library functions.
Claim 45
Dependent Claim
152 words
The data flow analysis according to claim 44, further including the steps of: evaluating said flow sets at read-time following completion of said analysis routine; and initiating a compiled code flow analysis routine at run- time if a flow set associated with a pointer includes the calling of one of said library functions among a plurality of pointer dereferences and if said library function can access said pointer associated with said flow set, said compiled code flow analysis routine comprising the steps of: performing a test following execution of said library function at run-time to determine if said pointer value associated with said flow set has been modified by said library function; and performing an additional pointer check for those pointer dereferences that are in said flow set following said call to said library function only if said pointer value associated with said dereferenced pointer has been modified by said library function.
Claim 46
Independent Claim
156 words
A method for detecting the initialization of one or more bytes of memory by a software routine being executed by a software generation system, said software generation system maintaining an initialization status for each of said bytes of memory, said detection method comprising the steps of: identifying all of said bytes of said memory that said software routine may access; marking each byte of said region of memory with a known value; analyzing said initialization status for all of said accessible memory to identify all of said corresponding bytes of accessible memory that is uninitialized when said software routine is executed; performing a first checksum on all of said accessible uninitialized memory before said software routine is executed; performing a second checksum on all of said accessible uninitialized memory after said software routine is executed; and detecting an initialization of said memory by said software routine if said first checksum does not equal said second checksum.
Claim 47
Dependent Claim
85 words
The detection method according to claim 46, further including the step of implementing an initialization status update routine if said first checksum does not equal said second checksum in order to update said initialization status, said initialization status update routine comprising the steps of: comparing the current contents of said accessible and previously uninitialized memory to said known marked value; identifying each byte of said region of memory that was initialized by said software routine; and updating said initialization status for said identified initialized bytes.
Claim 48
Independent Claim
149 words
A method for detecting the initialization of one or more bytes of memory by a software routine being executed by a software generation system. said software generation system maintaining an initialization status for each of said bytes of memory, said detection method comprising the steps of: identifying all of said memory that said software routine may access; analyzing said initialization status for all of said accessible memory to identify all of said corresponding bytes of accessible memory that is uninitialized when said software routine is called; saving all of said accessible uninitialized memory; performing a first checksum on all of said accessible uninitialized allocated memory before said software routine is executed; performing a second checksum on all of said accessible uninitialized memory after said software routine is executed; and detecting an initialization of said memory by said software routine if said first checksum does not equal said second checksum.
Claim 49
Dependent Claim
84 words
The detection method according to claim 48, further including the step of implementing an initialization status update routine if said first checksum does not equal said second checksum in order to update said initialization status, said initialization status update routine comprising the steps of: comparing said saved data to the current contents of said accessible and previously uninitialized memory; identifying each byte of said region of memory that was initialized by said software routine; and updating said initialization status for said identified initialized bytes.
Claim 50
Independent Claim
323 words
A system for detecting memory access errors in a software program, said software program consisting of a source code file being tested and one or more compiled library functions, said software program including one or more pointers that point to memory locations, said system comprising: a pointer check table for storing pointer information associated with each of said pointers, said pointer information including the last known contents of said associated pointer and the valid memory range of said associated pointer; means for converting said source code file into a parse tree; a memory error detection code inserter, said memory error detection code inserter comprising: means for detecting pointer assignments in said parse tree and for inserting pointer table updating commands and associated characteristic information into a modified parse tree for each detected pointer assignment, said characteristic information characterizing the pointer expression being assigned to said pointer; and means for detecting pointer dereferences in said parse tree and for inserting pointer checking command into a modified parse tree for each detected pointer dereference; means for converting said modified parse tree into a pseudo-code format; linking means for relocating one or more of said library functions; evaluating means for executing said pseudo-code and said library functions that may be called by said pseudo-code, said evaluating means comprising: means for updating said pointer check table for each detected pointer table update command and additional information in said pseudo-code; means for performing a pointer check for each detected pointer check command in said pseudo-code, said means for performing a pointer check further comprising: means for locating said pointer information in said pointer check table associated with said dereferenced pointer; means for retrieving the actual contents of said dereferenced pointer from said memory location where said pointer is stored; and means for determining if said actual contents of said dereferenced pointer is within said valid memory range retrieved from said associated pointer information in said pointer check table.