Check out the new USENIX Web site. next up previous
Next: Postprocessing: cleaning the core Up: Transformations Previous: Sensitive stack variables

Sensitive global variables

Finally, we define a new structure to contain all of the sensitive global variables, instantiating it as __smalloc_global_var. We allocate this structure on the secure heap with a special initialization function, using the gcc-specific attribute ``constructor'' to ensure that this function runs before main(). We also perform any initializations that are needed for sensitive global variables by expanding their initializer clauses into regular C statements and placing them in the constructor function.



Naveen Sastry 2003-05-12