[R-pkg-devel] truncating strings on purpose
Dear Brad, Kurt, ? Fri, 13 Dec 2024 18:08:27 +0000 Brad Eck <bradleyjeck at gmail.com> ?????:
The bad news is that following the gcc docs on avoid the warning did not seem to work:
I have asked on Libera.Chat's #gcc and was told that the "middle-end" warnings [1] (which include -Wstringop-truncation) should not count as failures when Address Sanitizer is enabled. (Many thanks to Sam James and Arsen Arsenovi? for the triage!) While we don't literally use -Werror, de-facto the result is the same: the package doesn't pass the check if the warning is emitted. The reason for that is that the "middle-end" warnings require optimisation to avoid false positives in the unreachable code paths, and sanitizers change optimisation too much for the warnings to remain reliable [2]. A similar false positive has been reported before [3]. Can we use -Wno-stringop-truncation during incoming checks with ASan?