This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 00/13] Request to merge Address Sanitizer in


dodji@redhat.com writes:

> The first patch is the initial import of the asan state from the
> Google branch into the [asan] branch.  Subsequent patches clean the
> code up, add features like protection of stack and global variables,
> instrumentation of memory access through built-in functions, and, last
> but not least, the import of the runtime library.

In reply to requests in this thread, I am going to post another patch
set that follows the same grouping that the one above, but that avoids
being a dump of the different commits that happen on the branch.

I made some changes that were requested by some reviewers, like changing
the -fasan flag into -faddress-sanitizer, incorporating the last changes
(to the runtime time library directory layout) from Wei that got
committed to the asan branch, and removing the uselessly included
headers from the asan.c file.  I also rebased the patches on top of
trunk of today.

Below is the new summary of the patch set.  It has been bootstrapped and
passed regression testing on x86_64-unknown-linux-gnu against trunk.

Diego Novillo (1):
  Initial import of asan from the Google branch

Dodji Seketeli (3):
  Make build_check_stmt accept an SSA_NAME for its base
  Factorize condition insertion code out of build_check_stmt
  Instrument built-in memory access function calls

Jakub Jelinek (5):
  Initial asan cleanups
  Emit GIMPLE directly instead of gimplifying GENERIC.
  Allow asan at -O0
  Implement protection of stack variables
  Implement protection of global variables

Wei Mi (1):
  Import the asan runtime library into GCC tree

 ChangeLog.asan                                     |    16 +
 Makefile.def                                       |     2 +
 Makefile.in                                        |   487 +-
 configure                                          |     1 +
 configure.ac                                       |     1 +
 gcc/ChangeLog.asan                                 |   159 +
 gcc/Makefile.in                                    |    10 +-
 gcc/asan.c                                         |  1483 ++
 gcc/asan.h                                         |    70 +
 gcc/cfgexpand.c                                    |   165 +-
 gcc/common.opt                                     |     4 +
 gcc/config/i386/i386.c                             |    11 +
 gcc/doc/invoke.texi                                |    13 +-
 gcc/doc/tm.texi                                    |     6 +
 gcc/doc/tm.texi.in                                 |     2 +
 gcc/gcc.c                                          |     1 +
 gcc/passes.c                                       |     2 +
 gcc/target.def                                     |    11 +
 gcc/toplev.c                                       |    14 +
 gcc/tree-pass.h                                    |     2 +
 gcc/varasm.c                                       |    22 +
 libsanitizer/ChangeLog.asan                        |     3 +
 libsanitizer/LICENSE.TXT                           |    97 +
 libsanitizer/Makefile.am                           |    46 +
 libsanitizer/Makefile.in                           |   773 +
 libsanitizer/README.gcc                            |     4 +
 libsanitizer/aclocal.m4                            |  9599 ++++++++++
 libsanitizer/asan/Makefile.am                      |    76 +
 libsanitizer/asan/Makefile.in                      |   631 +
 libsanitizer/asan/asan_allocator.cc                |  1045 ++
 libsanitizer/asan/asan_allocator.h                 |   177 +
 libsanitizer/asan/asan_flags.h                     |   103 +
 libsanitizer/asan/asan_globals.cc                  |   206 +
 libsanitizer/asan/asan_intercepted_functions.h     |   217 +
 libsanitizer/asan/asan_interceptors.cc             |   704 +
 libsanitizer/asan/asan_interceptors.h              |    39 +
 libsanitizer/asan/asan_internal.h                  |   169 +
 libsanitizer/asan/asan_linux.cc                    |   150 +
 libsanitizer/asan/asan_lock.h                      |    40 +
 libsanitizer/asan/asan_mac.cc                      |   526 +
 libsanitizer/asan/asan_mac.h                       |    54 +
 libsanitizer/asan/asan_malloc_linux.cc             |   142 +
 libsanitizer/asan/asan_malloc_mac.cc               |   427 +
 libsanitizer/asan/asan_malloc_win.cc               |   140 +
 libsanitizer/asan/asan_mapping.h                   |   120 +
 libsanitizer/asan/asan_new_delete.cc               |    54 +
 libsanitizer/asan/asan_poisoning.cc                |   151 +
 libsanitizer/asan/asan_posix.cc                    |   118 +
 libsanitizer/asan/asan_report.cc                   |   492 +
 libsanitizer/asan/asan_report.h                    |    51 +
 libsanitizer/asan/asan_rtl.cc                      |   404 +
 libsanitizer/asan/asan_stack.cc                    |    35 +
 libsanitizer/asan/asan_stack.h                     |    52 +
 libsanitizer/asan/asan_stats.cc                    |    86 +
 libsanitizer/asan/asan_stats.h                     |    65 +
 libsanitizer/asan/asan_thread.cc                   |   153 +
 libsanitizer/asan/asan_thread.h                    |   103 +
 libsanitizer/asan/asan_thread_registry.cc          |   188 +
 libsanitizer/asan/asan_thread_registry.h           |    83 +
 libsanitizer/asan/asan_win.cc                      |   190 +
 libsanitizer/asan/libtool-version                  |     6 +
 libsanitizer/config.guess                          |  1530 ++
 libsanitizer/config.sub                            |  1773 ++
 libsanitizer/configure                             | 17589 +++++++++++++++++++
 libsanitizer/configure.ac                          |    42 +
 libsanitizer/depcomp                               |   630 +
 libsanitizer/include/sanitizer/asan_interface.h    |   197 +
 .../include/sanitizer/common_interface_defs.h      |    66 +
 libsanitizer/install-sh                            |   527 +
 libsanitizer/interception/Makefile.am              |    59 +
 libsanitizer/interception/Makefile.in              |   535 +
 libsanitizer/interception/interception.h           |   195 +
 libsanitizer/interception/interception_linux.cc    |    28 +
 libsanitizer/interception/interception_linux.h     |    35 +
 libsanitizer/interception/interception_mac.cc      |    29 +
 libsanitizer/interception/interception_mac.h       |    47 +
 libsanitizer/interception/interception_win.cc      |   149 +
 libsanitizer/interception/interception_win.h       |    43 +
 libsanitizer/libtool-version                       |     6 +
 libsanitizer/ltmain.sh                             |  9661 ++++++++++
 libsanitizer/missing                               |   376 +
 libsanitizer/sanitizer_common/Makefile.am          |    71 +
 libsanitizer/sanitizer_common/Makefile.in          |   564 +
 .../sanitizer_common/sanitizer_allocator.cc        |    83 +
 .../sanitizer_common/sanitizer_allocator64.h       |   573 +
 libsanitizer/sanitizer_common/sanitizer_atomic.h   |    63 +
 .../sanitizer_common/sanitizer_atomic_clang.h      |   120 +
 .../sanitizer_common/sanitizer_atomic_msvc.h       |   134 +
 libsanitizer/sanitizer_common/sanitizer_common.cc  |   151 +
 libsanitizer/sanitizer_common/sanitizer_common.h   |   181 +
 libsanitizer/sanitizer_common/sanitizer_flags.cc   |    95 +
 libsanitizer/sanitizer_common/sanitizer_flags.h    |    25 +
 .../sanitizer_common/sanitizer_internal_defs.h     |   186 +
 libsanitizer/sanitizer_common/sanitizer_libc.cc    |   189 +
 libsanitizer/sanitizer_common/sanitizer_libc.h     |    69 +
 libsanitizer/sanitizer_common/sanitizer_linux.cc   |   296 +
 libsanitizer/sanitizer_common/sanitizer_list.h     |   118 +
 libsanitizer/sanitizer_common/sanitizer_mac.cc     |   249 +
 libsanitizer/sanitizer_common/sanitizer_mutex.h    |   106 +
 .../sanitizer_common/sanitizer_placement_new.h     |    31 +
 libsanitizer/sanitizer_common/sanitizer_posix.cc   |   187 +
 libsanitizer/sanitizer_common/sanitizer_printf.cc  |   196 +
 libsanitizer/sanitizer_common/sanitizer_procmaps.h |    95 +
 .../sanitizer_common/sanitizer_stackdepot.cc       |   194 +
 .../sanitizer_common/sanitizer_stackdepot.h        |    27 +
 .../sanitizer_common/sanitizer_stacktrace.cc       |   245 +
 .../sanitizer_common/sanitizer_stacktrace.h        |    73 +
 .../sanitizer_common/sanitizer_symbolizer.cc       |   311 +
 .../sanitizer_common/sanitizer_symbolizer.h        |    97 +
 .../sanitizer_common/sanitizer_symbolizer_linux.cc |   162 +
 .../sanitizer_common/sanitizer_symbolizer_mac.cc   |    31 +
 .../sanitizer_common/sanitizer_symbolizer_win.cc   |    33 +
 libsanitizer/sanitizer_common/sanitizer_win.cc     |   205 +
 113 files changed, 58851 insertions(+), 27 deletions(-)
 create mode 100644 ChangeLog.asan
 create mode 100644 gcc/ChangeLog.asan
 create mode 100644 gcc/asan.c
 create mode 100644 gcc/asan.h
 create mode 100644 libsanitizer/ChangeLog.asan
 create mode 100644 libsanitizer/LICENSE.TXT
 create mode 100644 libsanitizer/Makefile.am
 create mode 100644 libsanitizer/Makefile.in
 create mode 100644 libsanitizer/README.gcc
 create mode 100644 libsanitizer/aclocal.m4
 create mode 100644 libsanitizer/asan/Makefile.am
 create mode 100644 libsanitizer/asan/Makefile.in
 create mode 100644 libsanitizer/asan/asan_allocator.cc
 create mode 100644 libsanitizer/asan/asan_allocator.h
 create mode 100644 libsanitizer/asan/asan_flags.h
 create mode 100644 libsanitizer/asan/asan_globals.cc
 create mode 100644 libsanitizer/asan/asan_intercepted_functions.h
 create mode 100644 libsanitizer/asan/asan_interceptors.cc
 create mode 100644 libsanitizer/asan/asan_interceptors.h
 create mode 100644 libsanitizer/asan/asan_internal.h
 create mode 100644 libsanitizer/asan/asan_linux.cc
 create mode 100644 libsanitizer/asan/asan_lock.h
 create mode 100644 libsanitizer/asan/asan_mac.cc
 create mode 100644 libsanitizer/asan/asan_mac.h
 create mode 100644 libsanitizer/asan/asan_malloc_linux.cc
 create mode 100644 libsanitizer/asan/asan_malloc_mac.cc
 create mode 100644 libsanitizer/asan/asan_malloc_win.cc
 create mode 100644 libsanitizer/asan/asan_mapping.h
 create mode 100644 libsanitizer/asan/asan_new_delete.cc
 create mode 100644 libsanitizer/asan/asan_poisoning.cc
 create mode 100644 libsanitizer/asan/asan_posix.cc
 create mode 100644 libsanitizer/asan/asan_report.cc
 create mode 100644 libsanitizer/asan/asan_report.h
 create mode 100644 libsanitizer/asan/asan_rtl.cc
 create mode 100644 libsanitizer/asan/asan_stack.cc
 create mode 100644 libsanitizer/asan/asan_stack.h
 create mode 100644 libsanitizer/asan/asan_stats.cc
 create mode 100644 libsanitizer/asan/asan_stats.h
 create mode 100644 libsanitizer/asan/asan_thread.cc
 create mode 100644 libsanitizer/asan/asan_thread.h
 create mode 100644 libsanitizer/asan/asan_thread_registry.cc
 create mode 100644 libsanitizer/asan/asan_thread_registry.h
 create mode 100644 libsanitizer/asan/asan_win.cc
 create mode 100644 libsanitizer/asan/libtool-version
 create mode 100644 libsanitizer/config.guess
 create mode 100644 libsanitizer/config.sub
 create mode 100755 libsanitizer/configure
 create mode 100644 libsanitizer/configure.ac
 create mode 100644 libsanitizer/depcomp
 create mode 100644 libsanitizer/include/sanitizer/asan_interface.h
 create mode 100644 libsanitizer/include/sanitizer/common_interface_defs.h
 create mode 100644 libsanitizer/install-sh
 create mode 100644 libsanitizer/interception/Makefile.am
 create mode 100644 libsanitizer/interception/Makefile.in
 create mode 100644 libsanitizer/interception/interception.h
 create mode 100644 libsanitizer/interception/interception_linux.cc
 create mode 100644 libsanitizer/interception/interception_linux.h
 create mode 100644 libsanitizer/interception/interception_mac.cc
 create mode 100644 libsanitizer/interception/interception_mac.h
 create mode 100644 libsanitizer/interception/interception_win.cc
 create mode 100644 libsanitizer/interception/interception_win.h
 create mode 100644 libsanitizer/libtool-version
 create mode 100644 libsanitizer/ltmain.sh
 create mode 100644 libsanitizer/missing
 create mode 100644 libsanitizer/sanitizer_common/Makefile.am
 create mode 100644 libsanitizer/sanitizer_common/Makefile.in
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_allocator.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_allocator64.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_atomic.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_atomic_clang.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_atomic_msvc.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_common.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_common.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_flags.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_flags.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_internal_defs.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_libc.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_libc.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_linux.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_list.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_mac.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_mutex.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_placement_new.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_posix.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_printf.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_procmaps.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_stackdepot.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_stackdepot.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_stacktrace.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_symbolizer.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_symbolizer.h
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_symbolizer_linux.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_symbolizer_mac.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_symbolizer_win.cc
 create mode 100644 libsanitizer/sanitizer_common/sanitizer_win.cc

-- 
		Dodji


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]