public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wei Mi <wmi@google.com>
To: Jack Howarth <howarth@bromo.med.uc.edu>
Cc: Jakub Jelinek <jakub@redhat.com>,
		Konstantin Serebryany <konstantin.s.serebryany@gmail.com>,
	Richard Henderson <rth@redhat.com>,
		GCC Patches <gcc-patches@gcc.gnu.org>,
	David Li <davidxl@google.com>,
		Diego Novillo <dnovillo@google.com>,
	Dodji Seketeli <dodji@redhat.com>,
		Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [tsan] ThreadSanitizer instrumentation part
Date: Fri, 23 Nov 2012 00:53:00 -0000	[thread overview]
Message-ID: <CA+4CFy4CsRu76zc2NQ_adHDBSUJ8KJ0mhUJbqRFu_DCPrGTNTQ@mail.gmail.com> (raw)
In-Reply-To: <20121122231800.GA19012@bromo.med.uc.edu>

Hi Jack,

Koysta mentioned in a previous mail that tsan is only supported on
x86_64 linux (no 32-bits, no non-linux) for now. tsan building should
be disabled on the platforms other than x86-64-linux. Thanks to Jakub
who will provide another patch including this fix soon.

Thanks,
Wei.

On Thu, Nov 22, 2012 at 3:18 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> On Thu, Nov 22, 2012 at 02:08:07PM -0800, Wei Mi wrote:
>> Thanks. I checked in the code.
>> Committed revision 193736.
>> Committed revision 193737.
>>
>> Wei.
>
> Wei,
>    Unlike libasan, we seem to have issues building libtsan on darwin using the currently proposed
> patch...
>
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01817.html
>
> The build fails at...
>
> libtool: compile:  /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/./gcc/g++ -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/./gcc/ -nostdinc++ -nostdinc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/include/x86_64-apple-darwin12.2.0 -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/include -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121122/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121122/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121122/libstdc++-v3/testsuite/util -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/src -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/src/.libs -B/sw/lib/gcc4.8/x86_64-apple-darwin12.2.0/bin/ -B/sw/lib/gcc4.8/x86_64-apple-darwin12.2.0/lib/ -isystem /sw/lib/gcc4.8/x86_64-apple-darwin12.2.0/include -isystem /sw/lib/gcc4.8/x86_64-apple-darwin12.2.0/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../../../../gcc-4.8-20121122/libsanitizer/tsan -I ../../../../gcc-4.8-20121122/libsanitizer -I ../../../../gcc-4.8-20121122/libsanitizer/include -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -Wno-c99-extensions -g -O2 -MT tsan_interceptors.lo -MD -MP -MF .deps/tsan_interceptors.Tpo -c ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc  -fno-common -DPIC -o .libs/tsan_interceptors.o
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc: In function ‘unsigned int wrap_sleep(unsigned int)’:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:164:27: error: ‘sleep’ was not declared in this scope
>    unsigned res = sleep(sec);
>                            ^
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc: In function ‘int wrap_usleep(long_t)’:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:171:24: error: ‘usleep’ was not declared in this scope
>    int res = usleep(usec);
>                         ^
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc: In function ‘int wrap_nanosleep(void*, void*)’:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:178:31: error: ‘nanosleep’ was not declared in this scope
>    int res = nanosleep(req, rem);
>                                ^
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc: In function ‘void (* wrap_signal(int, sighandler_t))(int)’:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:1270:38: error: ‘sigaction’ was not declared in this scope
>    int res = sigaction(sig, &act, &old);
>                                       ^
> In file included from ../../../../gcc-4.8-20121122/libsanitizer/interception/interception.h:184:0,
>                  from ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.h:15,
>                  from ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:16:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc: In function ‘void __tsan::InitializeInterceptors()’:
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.cc:1377:18: error: ‘longjmp’ was not declared in this scope
>    TSAN_INTERCEPT(longjmp);
>                   ^
> ../../../../gcc-4.8-20121122/libsanitizer/interception/interception_mac.h:41:35: note: in definition of macro ‘OVERRIDE_FUNCTION_MAC’
>            (::__interception::uptr)old_func, \
>                                    ^
> ../../../../gcc-4.8-20121122/libsanitizer/interception/interception.h:187:35: note: in expansion of macro ‘INTERCEPT_FUNCTION_MAC’
>  # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_MAC(func)
>                                    ^
> ../../../../gcc-4.8-20121122/libsanitizer/tsan/tsan_interceptors.h:48:30: note: in expansion of macro ‘INTERCEPT_FUNCTION’
>  #define TSAN_INTERCEPT(func) INTERCEPT_FUNCTION(func)
>                               ^
> etc. Current llvm svn seems to be broken elsewhere (in compiler-rt/lib/ubsan) so I can't test tsan support there as well.
>               Jack
>
>>
>> On Thu, Nov 22, 2012 at 1:54 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> > On Wed, Nov 21, 2012 at 11:22:51PM -0800, Wei Mi wrote:
>> >> I update the tsan patch against trunk, and create libtsan patch.
>> >> Please see if it is ok.
>> >>
>> >> gcc/ChangeLog:
>> >> 2012-11-22  Dmitry Vyukov  <dvyukov@google.com>
>> >>             Wei Mi  <wmi@google.com>
>> >>
>> >>         * builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins.
>> >>         * sanitizer.def: Ditto.
>> >>         * Makefile.in (tsan.o): Add tsan.o target.
>> >>         (BUILTINS_DEF): Add sanitizer.def.
>> >>         * passes.c (init_optimization_passes): Add tsan passes.
>> >>         * tree-pass.h (register_pass_info): Ditto.
>> >>         * toplev.c (compile_file): Ditto.
>> >>         * doc/invoke.texi: Document tsan related options.
>> >>         * gcc.c (LINK_COMMAND_SPEC): Add LIBTSAN_SPEC in link command
>> >> if -fsanitize=thread.
>> >>         * tsan.c: New file about tsan.
>> >>         * tsan.h: Ditto.
>> >>         * common.opt: Add -fsanitize=thread.
>> >>
>> >> libsanitizer/ChangeLog:
>> >> 2012-11-22  Wei Mi  <wmi@google.com>
>> >>
>> >>         * tsan: New directory. Import tsan runtime from llvm.
>> >>         * configure.ac: Add 64 bits tsan build.
>> >>         * Makefile.am: Likewise.
>> >>         * configure: Regenerated.
>> >>         * Makefile.in: Likewise.
>> >
>> > Ok, thanks.  The comments can be fixed up incrementally.
>> >
>> >         Jakub

  reply	other threads:[~2012-11-23  0:53 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01  6:00 Xinliang David Li
2012-11-01  6:27 ` Jakub Jelinek
2012-11-01 15:47   ` Xinliang David Li
     [not found] ` <CA+4CFy4uuCtFuiqai0b_VXib1te=DeBv1_EWDFjf8UP6MYMJPg@mail.gmail.com>
     [not found]   ` <CAAkRFZKWhxJP=0p-6JCgMrMGPTj4Vv3m9yNhRgioOKxzTsss1Q@mail.gmail.com>
     [not found]     ` <CA+4CFy7ecGOkmXsdkC=LbSK5KMdBSR6eT0oLmfn2nbyr0S2bMA@mail.gmail.com>
2012-11-03  1:31       ` Wei Mi
2012-11-03 17:05         ` Wei Mi
2012-11-03 18:39           ` Jakub Jelinek
2012-11-06  0:37             ` Wei Mi
2012-11-12 18:58               ` Wei Mi
2012-11-13 16:41               ` Jakub Jelinek
2012-11-13 17:25                 ` Xinliang David Li
2012-11-13 17:36                   ` Jakub Jelinek
2012-11-13 17:55                     ` Xinliang David Li
2012-11-14  0:08                 ` Wei Mi
2012-11-14  0:54                   ` Richard Henderson
2012-11-14  1:06                     ` Wei Mi
2012-11-16 23:13                       ` Wei Mi
2012-11-18 18:52                         ` Konstantin Serebryany
2012-11-22  7:23                           ` Wei Mi
     [not found]                             ` <CACT4Y+aR5vizMRb7VCXK7w=bnEz29g9WjQkjvu=8=kds610D1Q@mail.gmail.com>
     [not found]                               ` <CACT4Y+YrUg13dqtUTD23qEWnySNgQ1T_H06R2=ytpXKZeG8UUQ@mail.gmail.com>
2012-11-22  7:45                                 ` Xinliang David Li
     [not found]                                   ` <CACT4Y+a07z9-VtGKQ7gGCyHWb_XH4sVWFtPG=qpkk_gJXfc40A@mail.gmail.com>
2012-11-22 22:06                                     ` Wei Mi
2012-11-22  8:08                               ` Jakub Jelinek
2012-11-22 15:13                                 ` [PATCH] Convert asan to use sanitizer.def builtins, initialize them if the FE didn't Jakub Jelinek
2012-12-03 16:58                                   ` Dodji Seketeli
2012-11-22  9:54                             ` [tsan] ThreadSanitizer instrumentation part Jakub Jelinek
2012-11-22 13:21                               ` [tsan] libsanitizer tweaks Jakub Jelinek
2012-11-22 23:22                                 ` Diego Novillo
2012-11-22 22:08                               ` [tsan] ThreadSanitizer instrumentation part Wei Mi
2012-11-22 23:04                                 ` H.J. Lu
2012-11-22 23:06                                   ` Jakub Jelinek
2012-11-22 23:18                                 ` Jack Howarth
2012-11-23  0:53                                   ` Wei Mi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-01 19:35 Xinliang David Li
2012-11-01 20:54 ` Jakub Jelinek
2012-11-01 20:57   ` Xinliang David Li
2012-11-01 21:07     ` Jakub Jelinek
2012-11-01 21:19       ` Xinliang David Li
2012-11-01 21:24         ` Jakub Jelinek
2012-11-01 21:43           ` Xinliang David Li
2012-11-01 18:11 Xinliang David Li
     [not found] ` <CACT4Y+azNYV+8ieRthd-SkQqGO82dj2+JOdL5c15DyBc9LwyfA@mail.gmail.com>
     [not found]   ` <CACT4Y+YQDBVxL2GdK9o-8kn===1XzX9JaBJUpM5N4MYCJAeo=Q@mail.gmail.com>
2012-11-01 18:20     ` Xinliang David Li
2012-11-01 18:22 ` Diego Novillo
2012-11-01 18:24 ` Jakub Jelinek
2012-11-01 18:32   ` Xinliang David Li
2012-11-01 18:49     ` Jakub Jelinek
2012-11-01 18:57       ` Xinliang David Li
2012-11-01 19:16         ` Jakub Jelinek
     [not found]           ` <CACT4Y+bbG3MOBX0vmP-Dvf=oPDp6GBDodJ+FbHrXEmjHjWn-qw@mail.gmail.com>
2012-11-01 20:53             ` Jakub Jelinek
2012-11-02 13:31 ` Martin Jambor
2012-11-02 15:54   ` Xinliang David Li
2012-11-02 15:58     ` Jakub Jelinek
2012-11-02 16:14       ` Xinliang David Li
2012-10-31 18:56 Wei Mi
2012-10-31 23:17 ` Jakub Jelinek
2012-11-01  6:02   ` Xinliang David Li
     [not found]   ` <CACT4Y+Z77tgge+k4+DOMkCLOWL4-xhate5Ccmav3Vox3_8Pqcw@mail.gmail.com>
2012-11-01  7:22     ` Jakub Jelinek
2012-11-01  6:58 ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+4CFy4CsRu76zc2NQ_adHDBSUJ8KJ0mhUJbqRFu_DCPrGTNTQ@mail.gmail.com \
    --to=wmi@google.com \
    --cc=davidxl@google.com \
    --cc=dnovillo@google.com \
    --cc=dodji@redhat.com \
    --cc=dvyukov@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=howarth@bromo.med.uc.edu \
    --cc=jakub@redhat.com \
    --cc=konstantin.s.serebryany@gmail.com \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).