2014-06-16 Yury Gribov <y.gribov@samsung.com>
commit4f86f72095126fb51addb6cb077527340061d98e
authorygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jun 2014 08:43:47 +0000 (16 08:43 +0000)
committerygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jun 2014 08:43:47 +0000 (16 08:43 +0000)
tree12171e966089acbfa2ba25f2dad65f1ce1ae09e5
parentee3265e4d373ea4cdd9a80097ef09aeb739eccef
2014-06-16  Yury Gribov  <y.gribov@samsung.com>

New asan-instrumentation-with-call-threshold parameter.

gcc/
* 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.

gcc/testsuite/
* 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/instrument-with-calls-3.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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211699 138bc75d-0d04-0410-961f-82ee72b054a4
18 files changed:
gcc/ChangeLog
gcc/asan.c
gcc/cfgcleanup.c
gcc/doc/invoke.texi
gcc/params.def
gcc/params.h
gcc/sanitizer.def
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/asan/instrument-with-calls-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c
gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c