From b92cccf41deffcfc22bb55557399efe1acb60c60 Mon Sep 17 00:00:00 2001 From: dodji Date: Mon, 12 Nov 2012 15:51:13 +0000 Subject: Initial import of asan from the Google branch This patch imports the initial state of asan as it was in the Google branch. It provides basic infrastructure for asan to instrument memory accesses on the heap, at -O3. Note that it supports neither stack nor global variable protection. The rest of the patches of the set is intended to further improve this base. gcc/ChangeLog * Makefile.in: Add asan.c and its dependencies. * common.opt: Add -faddress-sanitizer option. * invoke.texi: Document the new flag. * passes.c: Add the asan pass. * toplev.c (compile_file): Call asan_finish_file. * asan.c: New file. * asan.h: New file. * tree-pass.h: Declare pass_asan. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193432 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/common.opt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/common.opt') diff --git a/gcc/common.opt b/gcc/common.opt index f947a72cc2e..6088d1a7fec 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -837,6 +837,10 @@ fargument-noalias-anything Common Ignore Does nothing. Preserved for backward compatibility. +faddress-sanitizer +Common Report Var(flag_asan) +Enable AddressSanitizer, a memory error detector + fasynchronous-unwind-tables Common Report Var(flag_asynchronous_unwind_tables) Optimization Generate unwind tables that are exact at each instruction boundary -- cgit v1.2.1