Closed garbervetsky closed 6 years ago
@akashlal do you rely on the Initialization to be placed before the unknown initialization of inputs?
Note that this a harness instrumentation issue (AVH), not an AV issue. AVH in general has been designed specific to the applications we have seen so far. The current usage of this feature was to set up the initial heap, not global variables. I would suggest just adding a flag to AVH to delay the call to this method.
I expected to use this attribute with a method to initialize my variables with my custom code. However AV instrument the code in a way that a global variables are reinitialized after invoking the method.
Suppose there is a method $initialize_globals() that is meant to initialize some variables. So my file example.bpl (see attached zip file) will include this code:
The problem is that AV adds initialization code for the global variable just after my own initializer. For instance, example_inst.bpl look like this
I think the correct instrumentation will be adding the default intialization first and then my customized procedure.
example.zip