Patchwork [10/10] Import the asan runtime library into GCC tree

login
register
mail settings
Submitter H.J. Lu
Date Nov. 12, 2012, 6:59 p.m.
Message ID <CAMe9rOqmgEAF_YfgrUBCQJARv0QTJBz2zj3MJBgRwcN4BN12LQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/198440/
State New
Headers show

Comments

H.J. Lu - Nov. 12, 2012, 6:59 p.m.
On Mon, Nov 12, 2012 at 3:47 AM, Dodji Seketeli <dodji@seketeli.org> wrote:
> Diego Novillo <dnovillo@google.com> writes:
>
>> On 2012-11-02 16:10 , Dodji Seketeli wrote:
>>
>>>          * configure.ac: Add libsanitizer to target_libraries.
>>>      * Makefile.def: Ditto.
>>>      * configure: Regenerate.
>>>      * Makefile.in: Regenerate.
>>>      * libsanitizer: New directory for asan runtime.  Contains an empty
>>>      tsan directory.
>>>
>>> gcc:
>>>      * gcc.c (LINK_COMMAND_SPEC): Add -lasan to link command
>>>      if -faddress-sanitizer is on.
>>
>> OK with Jakub's comments addressed.
>>
>> References to -fasan in diagnostics should be replaced.  But there's
>> been another flag name change upstream, so let's do it together with
>> the new flag names.
>
> Done.   This also addresses the comment later made by Tobias below:
>
> Tobias Burnus <burnus@net-b.de> writes:
>
>> Other issues:
>
>> * Probably fixed on the branch: gcc/gcc.c still has "fasan" instead of
>> "faddress-sanitizer" for the spec:
>> +    %{fasan:-lasan}
>
> Below is a link to the updated patch.
>
> This patch imports the runtime library in the GCC tree, ensures that
> -lasan is passed to the linker when -faddress-sanitizer is used and
> sets up the build system accordingly.
>
>      * configure.ac: Add libsanitizer to target_libraries.
>         * Makefile.def: Ditto.
>         * configure: Regenerate.
>         * Makefile.in: Regenerate.
>         * libsanitizer: New directory for asan runtime.  Contains an empty
>         tsan directory.
>
> gcc:
>         * gcc.c (LINK_COMMAND_SPEC): Add -laddress-sanitizer to link command
>         if -faddress-sanitizer is on.
>
> libsanitizer:
>
>         Initial checkin: migrate asan runtime from llvm.
>
> http://people.redhat.com/~dseketel/gcc/patches/0011-Import-the-asan-runtime-library-into-GCC-tree.patch
>
> --
>                 Dodji

I checked in this patch to add libsanitizer generated files.

Patch

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index ef5d6f6..233870d 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@ 
+2012-11-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* gcc_update: Add libsanitizer generated files.
+
 2012-11-05  Lawrence Crowl  <crowl@google.com>

 	* compare_two_ftime_report_sets: New.
diff --git a/contrib/gcc_update b/contrib/gcc_update
index 02897ab..d9c2dfb 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -149,6 +149,9 @@  libatomic/Makefile.in: libatomic/Makefile.am
libatomic/aclocal.m4
 libatomic/testsuite/Makefile.in: libatomic/testsuite/Makefile.am
libatomic/aclocal.m4
 libatomic/configure: libatomic/configure.ac libatomic/aclocal.m4
 libatomic/auto-config.h.in: libatomic/configure.ac libatomic/aclocal.m4
+libsanitizer/aclocal.m4: libsanitizer/configure.ac
+libsanitizer/Makefile.in: libsanitizer/Makefile.am libsanitizer/aclocal.m4
+libsanitizer/configure: libsanitizer/configure.ac libsanitizer/aclocal.m4
 # Top level