[Bug sanitizer/62307] -fsanitize=undefined doesn't pay attention to __attribute__((returns_nonnull))
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 29 14:56:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62307
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
-fsanitize=null seems to imply -fno-delete-null-pointer-checks, so I assume
this is on purpose. It would actually be quite natural for the sanitizer to
insert an extra check after every call to a returns_nonnull function, checking
that the result is indeed !=0. Otherwise yes, sanopt is way too late for any
other optimization to take place.
More information about the Gcc-bugs
mailing list