Method and system for using inverted data to detect corrupt data
First Claim
1. A method of detecting, using a computer, an error in a data item selected from a plurality of data items, comprising the steps of:
- (a) providing a software library of functions that includes a constructor function, a conversion function, an error handling function, and a program including machine instructions defining program steps to be implemented by said computer;
(b) employing the constructor function to associate a protected data type with the data item, store the data item into a memory, determine an inverted data item corresponding to the data item that is stored in the memory, and store said inverted data item into the memory in association with the data item to which it corresponds;
(c) recalling the data item and the inverted data item from the memory when the data item is required in the program that is executed by the computer;
(d) comparing the recalled data item with the recalled inverted data item before either is used by the program so that a correspondence can be determined between said data items; and
(e) indicating that an error in one of the data item and the inverted data item that are recalled from the memory has occurred with the error handling function if the data item no longer corresponds to the inverted data item, else if the data item and the inverted data item correspond to each other, employing the conversion function to associate the data item with a non-protected data type, so that the data-item can be used by the program.
2 Assignments
0 Petitions
Accused Products
Abstract
Errors in data stored in the memory of a computer are detected prior to use of the data. A protected data type is declared in writing a program in which errors in critical data must be detected before the data are used. The invention is preferably implemented on a personal computer system (10) or in a microcontroller for a device. When a protected data item is initialized, both the protected data item and its corresponding bit-inverted form are stored in memory. A constructor function is used to determine the bit-inverted form. Any time that the protected data item is subsequently accessed for use by an application program, either the stored protected data item or its corresponding bit-inverted form are inverted for comparison to the other stored data item. Any difference detected in this comparison indicates that a change has occurred in either or both of the protected data item and its corresponding bit-inverted form within memory. Depending upon the application program in which the invention is used, an appropriate action is taken upon detecting such an error, such as providing an indication of the error and terminating further execution of the program.
72 Citations
20 Claims
-
1. A method of detecting, using a computer, an error in a data item selected from a plurality of data items, comprising the steps of:
-
(a) providing a software library of functions that includes a constructor function, a conversion function, an error handling function, and a program including machine instructions defining program steps to be implemented by said computer; (b) employing the constructor function to associate a protected data type with the data item, store the data item into a memory, determine an inverted data item corresponding to the data item that is stored in the memory, and store said inverted data item into the memory in association with the data item to which it corresponds; (c) recalling the data item and the inverted data item from the memory when the data item is required in the program that is executed by the computer; (d) comparing the recalled data item with the recalled inverted data item before either is used by the program so that a correspondence can be determined between said data items; and (e) indicating that an error in one of the data item and the inverted data item that are recalled from the memory has occurred with the error handling function if the data item no longer corresponds to the inverted data item, else if the data item and the inverted data item correspond to each other, employing the conversion function to associate the data item with a non-protected data type, so that the data-item can be used by the program. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method of detecting, using a computer, an error in a data item, selected from a plurality of data items, comprising the steps of:
-
(a) declaring the data item as a protected data type; (b) providing a software library of functions that includes a constructor function, a conversion function, an error handling function, the constructor function, and a program including machine instructions defining program steps to be implemented by said computer being employed to associate the data item with a protected data type; (c) employing the constructor function to create an inverted data item corresponding to the data item, when the data item is associated with the protected data type by the constructor function; (d) storing the data item and the inverted data item into the memory, said data item being stored into the memory in association with the inverted data item to which it corresponds; (e) prior to using the data item with the program recalling the data item and the inverted data item from the memory and determining whether the recalled data item and the recalled inverted data item correspond to each other; and (f) providing an indication of an error in one of the data item and the inverted data item with the error handling function if the data item and the inverted data item are recalled from memory and do not correspond to each other, else if said data item and the inverted data item correspond to each other, employing the conversion function to associate the data item with a non-protected data type, so that the data item can be used by the program. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A system for detecting an error in a data item selected from a plurality of data items, before the data item is employed in a computation, comprising:
-
(a) a computer for implementing the computation that employs the data item, said computer including; (i) a central processing unit that carries out program steps to detect an error in the data item; (ii) a memory for storing the data item, a software library having a plurality of functions, and machine instructions that control the central processing unit and define the program steps implemented by the central processing unit; and (iii) a data bus that couples the memory to the central processing unit; and (b) said machine instructions causing the central processing unit to; (i) access the software library; (ii) determine an inverted data item corresponding to the data item when the data item is stored in the memory, said inverted data item also being stored in the memory in association with the data item; (iii) recall the data item and the inverted data item from the memory when the data item is next required by the central processing unit; (iv) compare the data item with the inverted data item before either is used by the central processing unit; and (v) indicate that an error in one of the data item and the inverted data item has occurred if the data item that is compared to the inverted data item no longer corresponds to the inverted data item, else if said data item corresponds to said inverted data item, enabling the central processing unit to use said data item. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification