Self Modifing Code was RE: Harvard vs. vonNeuman

From: David V. Corbin <dvcorbin_at_optonline.net>
Date: Tue Sep 28 12:50:46 2004

>>> It is interesting that different people have different
>>> ideas as to what self modifying code is. Actually, the
>>> ability to load code and execute from a mass storage is
>>> self modifying.

AGREED

>>> Code that uses a variable value for a table to look up
>>> execution addresses is self modifying.

DISAGREE [the contents of a location containing executabgle code are never
changed]

>>> Most every
>>> multitasking system I've seen are self modifying.

AGREED

>>> I think what people consider dangerous self modifying is
>>> when the program alters the actual execution instructions
>>> in memory and then executes them. It is strange that this
>>> form gets such a large amount of emotional negative
>>> response while other types are hardly considered issues.
>>> No matter how the code is written, one can make bad code
>>> in most any form. One can also make good code as well.
>>> There is no reason why self modifying code should be any
>>> more dangerous than any other type of coding if done with a
>>> complete understanding of what the limitations are. What is
>>> the difference between replacing one or two instructions
>>> and then executing them or replacing an overlay and then
>>> executing that overlay? Other than size, both are doing the
>>> same thing. One is forbidden while the other is normal operation.

Since when do peoples reactions and reality coincide?


When I was involved in military systems development [77-92] the restriction
[for certain applications] against self-modifying code were quite clear:
Program memory had to be completely inviolate to change, execution out of
modifiable memory was not allowed, AND this had to be hardware enforced.
Received on Tue Sep 28 2004 - 12:50:46 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:37:32 BST