logoalt Hacker News

Hardening the C++ Standard Library at scale

99 pointsby ndesaulnierslast Sunday at 4:22 AM48 commentsview on HN

Comments

xiphias2today at 7:09 PM

It's great that finally bounds checking happened in C++ by (mostly) default.

The only thing that's less great is that this got so much less upvotes than all the Safe-C++ languages that never really had the chance to get into production in old code.

BinaryIgortoday at 7:40 PM

Interesting how C++ is still improving; seems like changes of this kind my rival at least some of the Rust use cases; time will tell

show 3 replies
fweimertoday at 9:23 PM

How does this compare to _GLIBCXX_ASSERTIONS in libstdc++ (on by default in Fedora since 2018)?

show 1 reply
ristoday at 7:35 PM

See also the "lite assertions" mode @ https://gcc.gnu.org/wiki/LibstdcxxDebugMode for glibc, however these are less well documented and it's less clear what performance impact these measures are expected to have.

tialaramextoday at 6:14 PM

> those that lead to undefined behavior but aren't security-critical.

Once again C++ people imagining into existence Undefined Behaviour which isn't Security Critical as if somehow that's a thing.

Mostly I read the link because I was intrigued as to how this counted as "at scale" and it turns out that's misleading, the article's main body is about the (at scale) deployment at Google, not the actual hardening work itself which wasn't in some special way "at scale".

show 1 reply
dana321today at 9:36 PM

Imagine hardening the regex library, its already as slow as molasses.

semiinfinitelytoday at 9:33 PM

by deleting it?

fighterhaolast Sunday at 5:11 AM

[flagged]

on_the_traintoday at 6:46 PM

std::optional is unsafe in idiomatic use cases? I'd like to challenge that.

Seems like the daily anti c++ post

show 4 replies