qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 01/12] configure: add --enable-tsan flag + fiber annotatio


From: Robert Foley
Subject: Re: [PATCH v1 01/12] configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext
Date: Wed, 3 Jun 2020 12:51:51 -0400

On Tue, 2 Jun 2020 at 15:22, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Robert Foley <robert.foley@linaro.org> writes:
>
> > From: Lingfeng Yang <lfy@google.com>
<snip>
> >
> > +# Thread sanitizer is, for now, much noisier than the other sanitizers;
> > +# keep it separate until that is not the case.
>
> I think we also need to stop both being enabled at once. On my clang-9
> setup I get:
>
>   make: *** [qapi/qobject-output-visitor.o] Error 1
>   clang: error: invalid argument '-fsanitize=address' not allowed with 
> '-fsanitize=thread'
>   clang: error: invalid argument '-fsanitize=address' not allowed with 
> '-fsanitize=thread'
>   clang: errorclang: : errorinvalid argument '-fsanitize=address' not allowed 
> with '-fsanitize=thread':
>   invalid argument '-fsanitize=address' not allowed with '-fsanitize=thread'
>   clang: error: invalid argument '-fsanitize=address' not allowed with 
> '-fsanitize=thread'

Good point.  I see a similar error if I use --enable-sanitizers and
--enable-tsan.
Will look to add an error check for this.  Wondering if there are any
other interactions
we need to avoid?  Will poke around a bit here.

<snip>

>
> Are we missing any LDFLAGS? On Ubuntu 18.04 with clang-9 I'm seeing:
>
>     LINK    qemu-ga
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_rtl_amd64.S.o):
>  warning: common of `__interception::real_setjmp' overridden by definition
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_interceptors.cc.o):
>  warning: defined here

Looks like these warnings come from use of --warn-common, so I think we need to
exclude this when using TSan if we want to silence these warnings from
the TSan libraries.

Thanks & Regards,
-Rob

>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_rtl_amd64.S.o):
>  warning: common of `__interception::real__setjmp' overridden by definition
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_interceptors.cc.o):
>  warning: defined here
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_rtl_amd64.S.o):
>  warning: common of `__interception::real_sigsetjmp' overridden by definition
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_interceptors.cc.o):
>  warning: defined here
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_rtl_amd64.S.o):
>  warning: common of `__interception::real___sigsetjmp' overridden by 
> definition
>   
> /usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.tsan-x86_64.a(tsan_interceptors.cc.o):
>  warning: defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:41:
>  multiple definition of `__tsan_mutex_linker_init'
>   
> libqemuutil.a(control.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:41:
>  first defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:50:
>  multiple definition of `__tsan_mutex_not_static'
>   
> libqemuutil.a(control.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:50:
>  first defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:55:
>  multiple definition of `__tsan_mutex_read_lock'
>   
> libqemuutil.a(control.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:55:
>  first defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:45:
>  multiple definition of `__tsan_mutex_read_reentrant'
>   
> libqemuutil.a(control.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:45:
>  first defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:64:
>  multiple definition of `__tsan_mutex_recursive_lock'
>   
> libqemuutil.a(control.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:64:
>  first defined here
>   
> libqemuutil.a(osdep.o):/usr/lib/llvm-9/lib/clang/9.0.0/include/sanitizer/tsan_interface.h:68:
>  multiple definition of `__tsan_mutex_recursive_unlock'
>
> <snip>
>
> --
> Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]