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 middle-end/71650] unnecessary call to __memcpy_chk emitted on a bounded copy


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.

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