Patent ID: 8464236
Filing Date: 2013-06-11
Classification: G06F

Abstract:
1. A method for avoiding data inconsistency between accesses of different functions of an application to a global variable in a data processing system, the method comprising: a) providing object codes of a plurality of functions to be executed in the data processing system and identifying those functions of the plurality of functions, called interfering functions, which access an identical global variable; b) selecting at least one interfering function; c) inserting a step of initialization of an auxiliary variable using a value of the global variable into an object code of each function selected in step b) or of a function calling a selected function prior to its call; and d) replacing a symbol of the global variable in the object code of the selected function by a reference to a memory space of the auxiliary variable; wherein in d) in the object code of the selected function, the symbol of the global variable is replaced by a symbol of the auxiliary variable and subsequently the symbol of the auxiliary variable is replaced by the reference to a storage space of the auxiliary variable, wherein, if at least one of the replacements performed on the selected function concerns a write access, a step of overwriting the global variable with a value of the auxiliary variable is inserted, wherein an identification of the interfering functions in step a) occurs based on information provided in addition to the object code of the selected function, and wherein ability of the functions to interrupt one another is detected based on priority values of the functions indicated in the additionally provided information.