Self-modifying code! The real kind!
Jethro via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 7 13:49:58 PDT 2017
On Friday, 7 April 2017 at 18:54:10 UTC, H. S. Teoh wrote:
> On Thu, Apr 06, 2017 at 05:36:52AM +0000, Swoorup Joshi via
> Digitalmars-d wrote:
>> Self-modifying might be the answer to all sorts of performance
>> problems due to branching. Only problem is security I guess.
>> Don't they disable writes to code segment anyway?
> [...]
>
> I don't think the OP was talking about self-modifying code in
> that sense. I think he was talking about a program that
> modifies its own *source code*, which is a different thing than
> a program that modifies its own machine code while that machine
> code is running.
>
>
> T
Yeah, that's what I mean. Basically D's meta programming
accomplishes the same effect for the most part but it is somewhat
limited. Mainly since one can't write to files for "security"
reasons(I'd like to know of any real world security issues that
this has caused!).
More information about the Digitalmars-d
mailing list