2 ms·
It only helps so much. I've taught to freshmen students who have personally encountered dozens of different false positives and false negatives not only with s
by yeputons 3y ago
It only helps so much.
I've taught to freshmen students who have personally encountered dozens of different false positives and false negatives not only with sanitizers, but with compiler warnings as well. Nothing extraordinary, just `-Wall -Wextra -Werror` with the latest available GCC/Clang on the latest available Ubuntu LTS.
Some examples (some library bugs are also included):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98677 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98677
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105729 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105729
https://github.com/llvm/llvm-project/issues/59432 https://github.com/llvm/llvm-project/issues/59432
https://github.com/boostorg/dll/issues/30 https://github.com/boostorg/dll/issues/30
https://github.com/boostorg/asio/commit/71964b22c7fade69cc4caa1c869a868e3a32cc97 https://github.com/boostorg/asio/commit/71964b22c7fade69cc4c...
https://github.com/chriskohlhoff/asio/issues/997 https://github.com/chriskohlhoff/asio/issues/997
I've also seen fun examples of a program working with all sanitizers in 14 modes across 3 OSes (GCC and Clang on Ubuntu, Apple Clang on macOS, Visual Studio on Windows), and _only_ failing with Visual Studio Release mode. It was an array overflow. Just was not caught by sanitizers.
Mind you: no weird C++ magic, just standard coding exercises.