Skip to content
Commit 58947e1f authored by Siddhesh Poyarekar's avatar Siddhesh Poyarekar
Browse files

fortify: Ensure that __glibc_fortify condition is a constant [BZ #29141]



The fix c8ee1c85 introduced a -1 check for object size without also
checking that object size is a constant.  Because of this, the tree
optimizer passes in gcc fail to fold away one of the branches in
__glibc_fortify and trips on a spurious Wstringop-overflow.  The warning
itself is incorrect and the branch does go away eventually in DCE in the
rtl passes in gcc, but the constant check is a helpful hint to simplify
code early, so add it in.

Resolves: BZ #29141
Signed-off-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
parent 28ea43f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment