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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This doesn't look safe.  You are ignoring the second operand of the MEM_REF, if
it is non-zero, you'll miscompile stuff.  So, either you need to do it only if
integer_zerop (TREE_OPERAND (rhs, 1)) on the MEM_REF, or need to handle the
offset (if out of bounds for the strlen, ignore it, otherwise adjust the length
accordingly).

Reply via email to