Allow to override Asan shadow offset.
authorYury Gribov <y.gribov@samsung.com>
Tue, 28 Oct 2014 09:46:29 +0000 (09:46 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Tue, 28 Oct 2014 09:46:29 +0000 (09:46 +0000)
commitfd960af2df5a437302039f248a542354ee4cddcf
tree504a2ebd7e810c8a58584e3f9ab605bd37f3a29f
parentea41822adfb3ea39ba43e033acd1f745abd79083
Allow to override Asan shadow offset.

2014-10-28  Yury Gribov  <y.gribov@samsung.com>

gcc/
* asan.c (set_asan_shadow_offset): New function.
(asan_shadow_offset): Likewise.
(asan_emit_stack_protection): Call asan_shadow_offset.
(build_shadow_mem_access): Likewise.
* asan.h (set_asan_shadow_offset): Declare.
* common.opt (fasan-shadow-offset): New option.
(frandom-seed): Fixed parameter name.
* doc/invoke.texi (fasan-shadow-offset): Describe new option.
(frandom-seed): Fixed parameter name.
* opts-global.c (handle_common_deferred_options): Handle
-fasan-shadow-offset.
* opts.c (common_handle_option): Likewise.

gcc/testsuite/
* c-c++-common/asan/shadow-offset-1.c: New test.

From-SVN: r216773
gcc/ChangeLog
gcc/asan.c
gcc/asan.h
gcc/common.opt
gcc/doc/invoke.texi
gcc/opts-global.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/shadow-offset-1.c [new file with mode: 0644]