News for hackers. Stuff that matters.
Re:My C code works with -O3 but not with -O0 by htfy96 on Thursday January 16, 2020 @07:31AM (#22063877)
I Second this. Most weird behaviors in C++ today can be detected by ASAN and UBSAN.

There also exists low-cost random-sampling-based ASAN implementation that can be enabled in production: Google uses GWP-ASAN for all server-side applications as well as Chrome on Windows/Mac. See https://www.youtube.com/watch?v=RQGWMLkwrKc for details.

Re:My C code works with -O3 but not with -O0 by pjmlp on Thursday January 16, 2020 @09:20AM (#22064714)
According to most surveys, they aren't used as much on real life.

Here 14%, https://www.jetbrains.com/lp/devecosystem-2019/cpp/

Here 40 - 55%, https://www.bfilipek.com/2019/12/cpp-status-2019.html

At CppCon 2015 or something, at Herb's question during his keynote, about 1% of the audience as per his comment on the video.

Re:My C code works with -O3 but not with -O0 by htfy96 on Thursday January 16, 2020 @09:26AM (#22064784)
This looks interesting. I was wondering if it's due to poor build tool support. In real life I found rr + sanitizer as a strictly better choice than plain gdb.