"Numerical Recipes in C" is nonportable code

Peter da Silva peter at ficc.uu.net
Thu Sep 8 11:52:09 AEST 1988


In article <640 at drilex.UUCP>, dricej at drilex.UUCP (Craig Jackson) writes:
> * Note that putting the protection in the compiler was also an idea
> of Per Brinch-Hansen's in the 1970s, with Concurrent Pascal.  Burroughs
> had been doing it for many years, even then.

What's to stop you from doing the following:

	Generate code in an array.
	Jump to the beginning of the array. *

Now you've blown the protection. You can do anything. I hope this isn't a
multiuser machine...

* this may involve such things as passing a pointer to an array to a
function that's declared that argument as a pointer to a function, or
even by writing the array out as a file and executing it... I can't see
how you could write a valid 'C' compiler that wouldn't let you violate
this protection.
-- 
Peter da Silva  `-_-'  Ferranti International Controls Corporation.
"Have you hugged  U  your wolf today?"            peter at ficc.uu.net



More information about the Comp.lang.c mailing list