Re: duplicate a variable!!!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/31/2011 11:16 AM, Greicy.Costa-Marques@xxxxxxx wrote:
> 
> Hi,  Ian
> 
>> One important question
>> is going to be how you know which variable you want to duplicate.
> 
> yes, i know which variables i want to duplicate.
> 
>> Presumably you don't want to duplicate all variables.
> 
> no, i want to duplicate all variables in my code.

Statically-allocated, or even on-stack variables?

>> Another important question is what you want to do with the  
>> duplicated variable.
> 
> Because I want to harden  my code.  I'm working with fault injection  
> by software and I want to harden my code, and a way of hardening is  
> the duplication of variables. And as I still do not know how, I chose  
> to start trying for a single variable and after to use the same path  
> for all variables in my code.
> 
>> If you duplicate the variable in a straightforward way, the duplicate will
>> simply be removed by the optimization passes.
> 
> I want the duplication remains after optimization.

I suspect that the easiest way would be to create a volatile copy of
every variable after gimplification, and then fix up all assignemnts
to copy into the volatile.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux