Messages in this thread | | | From | (John Reiser) | Date | Tue, 03 Nov 1998 09:09:31 -0800 | Subject | Re: Random Register Contents |
| |
Easier debugging is the major benefit of clearing the registers in exec(). For instance, consider running two supposedly-identical processes, and comparing their state vectors (all the bits) after every instruction. It is entirely possible to do so, especially by tracking incremental deltas. When a difference is found, then fork() everybody, adjust the accounting, and proceed. The cost is exponential in the number of differences. Depending on the amount of reconvergent fanout that exists (or can be pruned using human intervention), this becomes unwieldy after about a dozen differences. If the first five or six differences are due to exec(), then you don't get very far.
On the "truth and beauty" side the benefit is functionality, in the mathematical sense. The output of a process no longer depends on the address of argv and envp in the _parent_process's_ address space.
-- ----------------------------------------------------------- jreiser@teleport.com (John Reiser) -----------------------------------------------------------
| |