Live data from Hacker News

C++ creator rebuts White House warning

infoworld.com

61–65 of 65 posts

Re: C++ creator rebuts White House warning

#61
post #27

Earlier quoted context omitted.

not all applications need safety it is wrong to force safety onto the programmer especially if there is a cost to be paid to obtain it

That's an easy statement to make but in practice it's no longer acceptable; the Internet has become far too hostile and code that's "never going to be connected to the Internet" constantly does.

not all devices are connected to the internet

and writing software in c++ does not imply the software is unsafe

Re: C++ creator rebuts White House warning

#62
post #37

Earlier quoted context omitted.

asan only catches what your test suite covers. specifically, that doesn't include novel attacks.

That's kinda true, but if you use the compiler inserted address sanitizer code it will turn bugs from exploits into crashes. You can't exploit a OOB write if the write fails and the program crashes.

if you can afford the cost of that, just write your program in any other language c with asan is a lot slower than the safe alternatives

Re: C++ creator rebuts White House warning

#63
post #37

Earlier quoted context omitted.

That's kinda true, but if you use the compiler inserted address sanitizer code it will turn bugs from exploits into crashes. You can't exploit a OOB write if the write fails and the program crashes.

if you can afford the cost of that, just write your program in any other language c with asan is a lot slower than the safe alternatives

I made another comment about exactly that, but was addressing the concern that asan doesn't make code safe.

Re: C++ creator rebuts White House warning

#64
post #55

Earlier quoted context omitted.

See log4j vulnerability, you still need "just don't write bugs" with safe languages. What was really tried was "use C the hard way", which fails regularly as one can expect. Projects that use C the easy way have much better safety.

See ShellShock. Having memory safety vulnerabilities doesn't prevent other bugs. C and C++ projects still have logic errors, broken auth, XSS, SQL injection, and do dangerously dumb stuff, and that's on top of buffer overflows, user-after-frees, data races, and UB footguns. Nobody promises that memory safety will fix all bugs, but it can prevent or significantly reduce a class of vulnerabilities, and reduce the total…

You're talking about using C the hard way, that's difficult to get right indeed, because it's the hard way.

Re: C++ creator rebuts White House warning

#65
post #54
post #17

Earlier quoted context omitted.

…or called Carbon. https://en.wikipedia.org/wiki/Carbon_(programming_language)

Carbon is still a research project, the authors are the first to state to use Rust if one doesn't need to migrate existing C++ code.

The overarching point is to avoid new C++ code whenever possible. Carbon isn't intended to compete with or replace Rust. It's for more easily and seamlessly migrating away from C++ and its worst foot cannons.
Post reply on HN