-
- Downloads
PR middle-end/91582 - missing heap overflow detection for strcpy
gcc/ChangeLog: PR middle-end/91582 * builtins.c (gimple_call_alloc_size): New function. (compute_objsize): Add argument. Call gimple_call_alloc_size. Handle variable offsets and indices. * builtins.h (gimple_call_alloc_size): Declare. (compute_objsize): Add argument. * gcc/gimple-ssa-warn-restrict.c: Remove assertions. * tree-ssa-strlen.c (handle_store): Handle calls to allocated objects. gcc/testsuite/ChangeLog: PR middle-end/91582 * c-c++-common/Wstringop-truncation.c: Remove xfails. * g++.dg/warn/Wstringop-overflow-4.C: New test. * g++.dg/ext/attr-alloc_size.C: Suppress -Warray-bounds. * gcc.dg/Warray-bounds-56.c: New test. * gcc.dg/Wstringop-overflow-22.c: New test. * gcc.dg/attr-alloc_size.c: Suppress -Warray-bounds. * gcc.dg/attr-copy-2.c: Same. * gcc.dg/builtin-stringop-chk-5.c: Remove xfails. * gcc.dg/builtin-stringop-chk-8.c: Same. Correct the text of expected warnings. * gcc.target/i386/pr82002-2a.c: Prune expected warning. * gcc.target/i386/pr82002-2b.c: Same. From-SVN: r278983
Showing
- gcc/ChangeLog 11 additions, 0 deletionsgcc/ChangeLog
- gcc/builtins.c 210 additions, 20 deletionsgcc/builtins.c
- gcc/builtins.h 2 additions, 1 deletiongcc/builtins.h
- gcc/gimple-ssa-warn-restrict.c 0 additions, 2 deletionsgcc/gimple-ssa-warn-restrict.c
- gcc/testsuite/ChangeLog 15 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/Wstringop-truncation.c 1 addition, 1 deletiongcc/testsuite/c-c++-common/Wstringop-truncation.c
- gcc/testsuite/g++.dg/ext/attr-alloc_size.C 1 addition, 1 deletiongcc/testsuite/g++.dg/ext/attr-alloc_size.C
- gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C 157 additions, 0 deletionsgcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C
- gcc/testsuite/gcc.dg/Warray-bounds-56.c 88 additions, 0 deletionsgcc/testsuite/gcc.dg/Warray-bounds-56.c
- gcc/testsuite/gcc.dg/Wstringop-overflow-25.c 377 additions, 0 deletionsgcc/testsuite/gcc.dg/Wstringop-overflow-25.c
- gcc/testsuite/gcc.dg/attr-alloc_size.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/attr-alloc_size.c
- gcc/testsuite/gcc.dg/attr-copy-2.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/attr-copy-2.c
- gcc/testsuite/gcc.dg/builtin-stringop-chk-5.c 6 additions, 6 deletionsgcc/testsuite/gcc.dg/builtin-stringop-chk-5.c
- gcc/testsuite/gcc.dg/builtin-stringop-chk-8.c 5 additions, 5 deletionsgcc/testsuite/gcc.dg/builtin-stringop-chk-8.c
- gcc/testsuite/gcc.target/i386/pr82002-2a.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/i386/pr82002-2a.c
- gcc/testsuite/gcc.target/i386/pr82002-2b.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/i386/pr82002-2b.c
- gcc/tree-ssa-strlen.c 16 additions, 2 deletionsgcc/tree-ssa-strlen.c
Loading
Please register or sign in to comment