[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 --- Comment #10 from ygribov at gcc dot gnu.org --- Author: ygribov Date: Thu Oct 16 13:46:39 2014 New Revision: 216326 URL: https://gcc.gnu.org/viewcvs?rev=216326root=gccview=rev Log: New asan-instrumentation-with-call-threshold parameter. 2014-10-16 Yury Gribov y.gri...@samsung.com Backport from mainline 2014-06-16 Yury Gribov y.gri...@samsung.com * asan.c (check_func): New function. (maybe_create_ssa_name): Likewise. (build_check_stmt_with_calls): Likewise. (use_calls_p): Likewise. (report_error_func): Change interface. (build_check_stmt): Allow non-integer lengths; add support for new parameter. (asan_instrument): Likewise. (instrument_mem_region_access): Moved code to build_check_stmt. (instrument_derefs): Likewise. (instrument_strlen_call): Likewise. * cfgcleanup.c (old_insns_match_p): Add support for new functions. * doc/invoke.texi: Describe new parameter. * params.def: Define new parameter. * params.h: Likewise. * sanitizer.def: Describe new builtins. * c-c++-common/asan/instrument-with-calls-1.c: New test. * c-c++-common/asan/instrument-with-calls-2.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-1.c: Update test patterns. * c-c++-common/asan/no-redundant-instrumentation-2.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-4.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise. * c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise. Backport from mainline 2014-06-16 Yury Gribov y.gri...@samsung.com * asan.c (build_check_stmt): Fix maybe-uninitialized warning. Backport from mainline 2014-06-18 Yury Gribov y.gri...@samsung.com PR sanitizer/61530 * asan.c (build_check_stmt): Add condition. * c-c++-common/asan/pr61530.c: New test. Backport from mainline 2014-06-18 Yury Gribov y.gri...@samsung.com PR sanitizer/61547 * asan.c (instrument_strlen_call): Fixed instrumentation of trailing byte. * c-c++-common/asan/strlen-overflow-1.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/pr61530.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/asan.c branches/gcc-4_9-branch/gcc/cfgcleanup.c branches/gcc-4_9-branch/gcc/doc/invoke.texi branches/gcc-4_9-branch/gcc/params.def branches/gcc-4_9-branch/gcc/params.h branches/gcc-4_9-branch/gcc/sanitizer.def branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch --- fixed, I meant.
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed: What|Removed |Added CC||Joost.VandeVondele at mat dot ethz ||.ch --- Comment #8 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch --- This is fixed AFAICT, please reopen if not.
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 --- Comment #7 from Maxim Ostapenko chefmax at gcc dot gnu.org --- Author: chefmax Date: Fri Jun 20 10:26:55 2014 New Revision: 211846 URL: https://gcc.gnu.org/viewcvs?rev=211846root=gccview=rev Log: 2014-06-18 Yury Gribov y.gri...@samsung.com gcc/ PR sanitizer/61530 * asan.c (build_check_stmt): Add condition. gcc/testsuite/ * c-c++-common/asan/pr61530.c: New test. Added: trunk/gcc/testsuite/c-c++-common/asan/pr61530.c Modified: trunk/gcc/ChangeLog trunk/gcc/asan.c trunk/gcc/testsuite/ChangeLog
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 --- Comment #6 from Yury Gribov y.gribov at samsung dot com --- Created attachment 32965 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32965action=edit Alternative patch Draft patch to illustrate the last proposal. Bootstrap pending.
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Yury Gribov y.gribov at samsung dot com changed: What|Removed |Added CC||y.gribov at samsung dot com --- Comment #1 from Yury Gribov y.gribov at samsung dot com --- Mine.
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.10.0
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 --- Comment #2 from Yury Gribov y.gribov at samsung dot com --- Created attachment 32951 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32951action=edit Proposed patch This seems to fix the ICE (I haven't yet done complete bootstrap, just Asan tests).
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 --- Comment #3 from Yury Gribov y.gribov at samsung dot com --- Bootstrapped and regtested successfully on x64. Let's wait for Jakub's comments.
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-06-17 Ever confirmed|0 |1 --- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org --- LGTM, just please use some other function name than error, error is a glibc function and it is unnecessary to override it with something unrelated. Also, patches should go to gcc-patches...
[Bug sanitizer/61530] [4.10 Regression] segfault with asan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530 Yuri Gribov tetra2005 at gmail dot com changed: What|Removed |Added CC||tetra2005 at gmail dot com --- Comment #5 from Yuri Gribov tetra2005 at gmail dot com --- Actually the fix may not handle unaligned addresses properly. I think we should rather stick with start and end bytes for memory regions in builtins. What's your opinion?