https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118300
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by David Malcolm <[email protected]>: https://gcc.gnu.org/g:57b255ca70bddeb52d6059e5d458e70290154ce1 commit r14-12111-g57b255ca70bddeb52d6059e5d458e70290154ce1 Author: David Malcolm <[email protected]> Date: Wed Feb 19 09:44:46 2025 -0500 analyzer: handle more IFN_UBSAN_* as no-ops [PR118300] Previously the analyzer treated IFN_UBSAN_BOUNDS as a no-op, but the other IFN_UBSAN_* were unrecognized and conservatively treated as having arbitrary behavior. Treat IFN_UBSAN_NULL and IFN_UBSAN_PTR also as no-ops, which should make -fanalyzer behave better with -fsanitize=undefined. gcc/analyzer/ChangeLog: PR analyzer/118300 * kf.cc (class kf_ubsan_bounds): Replace this with... (class kf_ubsan_noop): ...this. (register_sanitizer_builtins): Use it to handle IFN_UBSAN_NULL, IFN_UBSAN_BOUNDS, and IFN_UBSAN_PTR as nop-ops. (register_known_functions): Drop handling of IFN_UBSAN_BOUNDS here, as it's now handled by register_sanitizer_builtins above. gcc/testsuite/ChangeLog: PR analyzer/118300 * gcc.dg/analyzer/ubsan-pr118300.c: New test. Signed-off-by: David Malcolm <[email protected]> (cherry picked from commit 58b90139e093aeb5494627d92257a97aebb4a6d9)
