Stack clearing device and method
First Claim
1. A method of producing computer executable code for automatically clearing a computer program stack in computer memory, said program stack having a pointer which identifies a memory address value for a top of the stack, and said program stack being operable for storing and passing of data between calling and called processes and subroutines, said method comprising the steps of:
- providing a computer program source code compiler having a user control to enable and disable automatic generation of executable code to clear computer stack memory;
receiving at least one computer program source code module and an associated user compiler control;
performing analysis on said computer program source code to find and identify instances of process and subroutine call and return operations; and
inserting stack clearing computer program code into said computer program source code prior to return operations and following call operations such that when the modified computer program code is compiled and executed, stack memory utilized by called processes and subroutines will be cleared to prevent usage of residual data in the stack by other processes or subroutines, said insertion of stack clearing computer program code being inserted only if said user control indicates enablement of insertion of the code.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for removing residual data from a computer program stack prior to returning control to a calling or controlling process with system and method for automatic inclusion thereof into software application programs at the time of production of executable code. Two methods, one for removing residual data from a relatively small stack frame and another for removing residual data from a large stack frame, are automatically inserted into application program code during an enhanced compiling method. Two compiler controls allow a software designer to globally include the stack cleaning feature in all code being produced, or to selectively include the stack cleaning feature into certain indicated modules, code areas, or procedures.
42 Citations
36 Claims
-
1. A method of producing computer executable code for automatically clearing a computer program stack in computer memory, said program stack having a pointer which identifies a memory address value for a top of the stack, and said program stack being operable for storing and passing of data between calling and called processes and subroutines, said method comprising the steps of:
-
providing a computer program source code compiler having a user control to enable and disable automatic generation of executable code to clear computer stack memory;
receiving at least one computer program source code module and an associated user compiler control;
performing analysis on said computer program source code to find and identify instances of process and subroutine call and return operations; and
inserting stack clearing computer program code into said computer program source code prior to return operations and following call operations such that when the modified computer program code is compiled and executed, stack memory utilized by called processes and subroutines will be cleared to prevent usage of residual data in the stack by other processes or subroutines, said insertion of stack clearing computer program code being inserted only if said user control indicates enablement of insertion of the code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer program product for producing computer executable code for automatically clearing a computer program stack in computer memory, said program stack having a pointer which identifies a memory address value for a top of the stack, and said program stack being operable for storing and passing of data between calling and called processes and subroutines, said computer program product comprising:
-
a computer usable medium having computer readable compiler program code means embodied in said medium for compiling computer program source code, said compiler having a user compiler control to enable and disable automatic generation of executable code to clear computer stack memory;
a computer usable medium having computer readable program code means embodied in said medium for performing analysis of said computer program source code to find and identify instances of process and subroutine call and return operations; and
a computer usable medium having computer readable compiler program code means embodied in said medium for inserting stack clearing computer program code into said computer program source code prior to return operations and following call operations such that when the modified computer program code is compiled and executed, stack memory utilized by called processes and subroutines will be cleared to prevent usage of residual data in the stack by other processes or subroutines, said insertion of stack clearing computer program code being inserted only if said user control indicates enablement of insertion of the code. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A system for producing computer executable code from computer source code, and for automatically including executable code which clears computer program stack used by called processes and subroutines, said program stack being operable for storing and passing of data between calling and called processes and subroutines, said system comprising:
-
a computer suitable for compiling computer source code, said computer having a processor and computer-readable memory;
a compiler control; and
a source code compiler disposed in a computer-readable memory and being executable by said computer, said source code compiler having an input for receiving computer source code to be compiled, and having an output for creating computer executable code, said source code compiler further having an analyzer for identifying program and subroutine call operations and return operations in computer source code, and having a code inserter which inserts program stack clearing code prior to return operations and following call operations in computer source code, said insertion being performed only if enabled by a compiler control. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
Specification