https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62307
--- Comment #3 from Alexey Samsonov <samsonov at google dot com> --- FYI, Jakub has proposed a patch to add additional check to -fsanitize=undefined that would specifically sanitize functions with returns_nonnull attribute: however, it would sanitize bodies of the function and insert checks before return-statements to verify in runtime that the function actually doesn't return null.