This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/86732] Potential nullptr dereference does not propagate knowledge about the pointer
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Aug 2018 06:57:10 +0000
- Subject: [Bug tree-optimization/86732] Potential nullptr dereference does not propagate knowledge about the pointer
- Auto-submitted: auto-generated
- References: <bug-86732-4@http.gcc.gnu.org/bugzilla/>
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.