Self-modifying code

Ge' Weijers ge at hobbit.sci.kun.nl
Wed Jul 27 19:12:55 AEST 1988


>From article <1848 at van-bc.UUCP>, by sl at van-bc.UUCP (pri=-10 Stuart Lynne):
[About self-modifying code]
> A simple definition might be any program that cannot be compiled and run
> in shared text mode (or equivalent for non Unix application environments).

What about programs that write code into the data segment and then 
call it:

int myproc[1000];

..... generating s/m code

(*((int (*)())myproc))(); /* and calling it */

We need a better definition I'm afraid
-- 
Ge' Weijers, Informatics dept., Nijmegen University, the Netherlands
UUCP: {uunet!,}mcvax!kunivv1!hobbit!ge



More information about the Comp.lang.c mailing list