Skip to content
Prev 11107 / 12125 Next

[R-pkg-devel] truncating strings on purpose

Dear Brad, Kurt,

? Fri, 13 Dec 2024 18:08:27 +0000
Brad Eck <bradleyjeck at gmail.com> ?????:
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?