Is it possible that I might possibly write a code that corrupts the compiler? Means can bad programming practices lead to such a situation where I might end up harming the compiler and I am assuming that the code I have written is not some sort of virus which is specifically designed to do this?
Share
Generally speaking the compiler consists of static code. Static code will be rerun from scratch each time you run the program. So as long you don’t have access to it, you cannot corrupt the compiler.
There are programming languages that let you extend using the compiler. But even if you can extend the language, it is likely that the compiler will start afresh each run. Furthermore, it is unlikely that you can trigger anything harmful this way.
There are compiler bugs and they may be triggered. But normally that will just result in a failed build.
Now if you have a
Makefileyou can change anything the user has access to. So building an application could trigger unwanted side effects. Install scripts are the most likely to influence a system of course, as they normally run with elevated priviledges.