[Bug middle-end/71650] unnecessary call to __memcpy_chk emitted on a bounded copy

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 24 19:52:00 GMT 2016


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The question is if we want to do anything here.  The problem is that VRP ranges
are computed from many sources, it can be comparisons in the code you show, or
masking of values, but it can as well be just because we prove that using
values outside of the ranges would necessarily trigger undefined behavior.
But, -D_FORTIFY_SOURCE=2 is a security feature to protect against undefined
behavior, and we don't have information whether the particular VR is guaranteed
in all executions or only those that don't invoke UB.


More information about the Gcc-bugs mailing list