This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/86732] Potential nullptr dereference does not propagate knowledge about the pointer


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86732

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #5)
> And FWIW, I think we should be using __builtin_trap rather than
> __builtin_unreachable in many more places because of the security concerns.

It would be better to control it with flags instead of doing it inconsistently
depending on who wrote each pass. We already have -fsanitize=unreachable
-fsanitize-undefined-trap-on-error to automatically replace
__builtin_unreachable with __builtin_trap. However, we do not have an opposite
'performance' option for cases where security is irrelevant.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]