|
From: Julian S. <js...@ac...> - 2012-02-23 08:30:16
|
> (1) Is the zero-out done on purpose? Perhaps according to the rationale: > by the time execution reaches those parts of the application > program a user cares about, glibc will have populated the registers > with some defined values anyhow? So why bother here? Well .. so the zero-out for the other architectures .. I did that because from a conservatism point of view. Getting an initial state that works reliably has been difficult (on ppc64-linux I had mucho trouble) so zeroing everything seemed simplest. > (2) If I wanted to initialize those shadow areas to mark the registers > as uninitialized, what bit pattern should be stored? All bits 1? Yeah, 0 = defined, 1 = undefined. ------ Once the system is up and running and in "steady state", all undefinedness comes from either heap allocation, stack allocation or state changes caused by system calls. Making the registers undefined at process start will therefore at best find you uninit value uses only up to the point where they first become defined, which should happen very soon after startup. So .. apart from the curiosity value, I am not sure what this will buy you in the general case. Maybe you are doing some bizarre experiment with your handwritten assembly version of _start? J |