[Bug sanitizer/77966] Corrupt function with -fsanitize-coverage=trace-pc

2016-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77966

--- Comment #10 from Martin Liška  ---
Ok, with the patch applied (r241463), you should be given expected output.
Please combine that with -fsanitize-undefined-trap-on-error and the binary will
be instrumented as desired in #c4.

[Bug sanitizer/77966] Corrupt function with -fsanitize-coverage=trace-pc

2016-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77966

--- Comment #9 from Martin Liška  ---
Author: marxin
Date: Mon Oct 24 07:00:53 2016
New Revision: 241463

URL: https://gcc.gnu.org/viewcvs?rev=241463=gcc=rev
Log:
Do not disable aggressive loop opts for

PR sanitizer/77966
* opts.c (finish_options): Skip conditionally.
PR sanitizer/77966
* c-c++-common/ubsan/unreachable-3.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/ubsan/unreachable-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/opts.c
trunk/gcc/testsuite/ChangeLog

[Bug sanitizer/77966] Corrupt function with -fsanitize-coverage=trace-pc

2016-10-17 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77966

Martin Liška  changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu.org,
   ||dvyukov at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||kcc at gcc dot gnu.org
  Component|target  |sanitizer

--- Comment #8 from Martin Liška  ---
Ok, after discussion with Jakub, I'm going to create a patch that would enable
aggressive loop optimizations when -fsanitize=leak or -fsanitize=unreachable is
enabled (a different sanitization disable them).