4 ms·
HPC code is trivially 'easy' to write from this perspective. You mainly 'only' have to worry about memory leaks, dead locks or overflows on valid or accidental
by dagw 12y ago
HPC code is trivially 'easy' to write from this perspective. You mainly 'only' have to worry about memory leaks, dead locks or overflows on valid or accidentally miss-formated data. It's not like an army of world class hackers are pouring over your code looking for vulnerabilities to exploit. Nor that someone will intentionally try to craft input that will crash your application.
- ars 12y agoIf you ran valgrind (and mudflap) then any error that might be detected by a compiler with range checking will be detected. Any further errors will not be fixed by any supposed "safe" language either. Imagining that another language will make a difference is a mistake. It will not.
- pjmlp 12y agoAssuming such tools exist for a specific OS, and not only UNIX flavours.
- dllthomas 12y agoStrictly, "... or that you can run your tests on an OS that does, and your code does not behave meaningfully differently between OSes." Either way, it may or may not be a strong assumption, depending on domain...
- dllthomas 12y ago"If you ran valgrind (and mudflap) then any error that might be detected by a compiler with range checking will be detected." Only if you can be sure you have touched all the interesting portions of input-space. Ideally your tests are doing this, but wherever your tests miss aren't covered by valgrind or mudflap but are covered by a change of language. That's a part of what's meant by safe. It's not that it's impossible to write correct code in an unsafe language. It's that it's difficult to impossible to verify that you have written correct code. I'm very willing to include available tools in that calculation, but valgrind and mudflap (while tremendously useful) cannot give guarantees.