View Single Post
Old 01 August 2015, 14:55   #148
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Originally Posted by meynaf View Post
Code you explicitly run can always do wrong things, even if it has to call APIs for this. As I said many times, once the code executes it's too late.
yes you have said it many times, and it was wrong just as many times. Code can execute in a system with memory protection... but as soon as it tries to do anything such as writing to protected memory - boom! Segmentation fault. Process terminate. No harm done.

It can help, but a better way would be to stop misusing the stack when programming
Well this is true, but how do you prevent someone from doing so?

How so ?
Because i'm not constantly inviting strangers into my own home off the street all day. If i were, i would certainly want some internal security. A better analogy would be a guest house or inn, or maybe living above a shop. Customers come in, maybe i refuse to serve them if they look a bit dodgy... maybe i have a doorman, maybe i have a list of people who are banned. But i'd still want a lockable door between my own rooms and the guest area, where the customers - or websites - can stay a while.

Actually customers is not such a good analogy, either. It may not likely be the customers who do the damage. But maybe some of them have fleas... fleas with lasers controlled by the evil laser-flea overlord.

Originally Posted by kolla View Post
If I am a software developer for a system that may run with virtual private memory space, or with shared common memory space... hmm, why would I want to write software for the latter?
One bug we recently fixed in a client's (Windows) code was that it required to run from an admin account. Of course it didn't really need to at all, but it was storing its config files in the application directory. Windows users are of course used to only using an admin account, and approving of everything that asks for permissions. There must be a parable about this involving wolves, i'm sure.

Last edited by Mrs Beanbag; 01 August 2015 at 15:01.
Mrs Beanbag is offline  
Page generated in 0.05324 seconds with 9 queries