Immutability - was Re: ENIAC programming Was: release dates of early microcomputer operating systems, incl. Intel ISIS

Dave G4UGM dave.g4ugm at gmail.com
Sat Sep 19 02:07:53 CDT 2015



> -----Original Message-----
> From: cctalk [mailto:cctalk-bounces at classiccmp.org] On Behalf Of Toby
Thain
> Sent: 17 September 2015 18:30
> To: General at classiccmp.org; Discussion at classiccmp.org:On-Topic and Off-
> Topic Posts <cctalk at classiccmp.org>; General at classiccmp.org
> Subject: Immutability - was Re: ENIAC programming Was: release dates of
> early microcomputer operating systems, incl. Intel ISIS
> 
> On 2015-09-17 12:44 PM, Jon Elson wrote:
> >
> >>      > From: Dave Wade
> >>
> >>
> >>      > to me a "computer" without self-modifying code is a programmable
> >>      > calculator even if it has index registers...
> >>
> >>
> > Most modern computer languages run with the executable instructions in
> > a "pure code" section, which is set to be NOT writeable by the program.
> > This avoids a LOT of simple mistakes and REALLY hard to find program
> > crashes.
> > This is true of MS, Linux/Unix and the VMS program environment that I
> > have used for about 40 years.  I think you have to go back to maybe
> > Windows 95 or RT-11 to not have that protection.

Actually not (quite).  The true virtual machines in NT builds of Windows and
Linux protect programs from each other. So you can't damage someone else's
code...
but I believe that you could still load code into the data area and execute
it.. up until about 10 years ago when DEP was introduced....

http://malwaremusings.com/2012/10/13/self-modifying-code-changing-memory-pro
tection/

and if your code is running with admin rights on Windows you can use the
"VirtualProtect" interface  to allow you to write self-modifying code.....

https://msdn.microsoft.com/en-us/library/windows/desktop/aa366898(v=vs.85).a
spx

Of course this is part of the reason we have all these problems with Buffer
Overrun.....


> 
> Modern languages extend this "protection" further, to the programmer
> model, with immutable bindings and data structures, shunning variables
> entirely.
> 
> --Toby
> 
> >
> > Jon
> >

Dave



More information about the cctalk mailing list