[LLVMdev] linker warnings in Linking CXX executable Debug/AsanTest

Jack Howarth howarth at bromo.med.uc.edu
Sat Nov 3 14:33:43 PDT 2012


On Fri, Nov 02, 2012 at 06:45:07PM +0400, Alexey Samsonov wrote:
> Hi, Jack!
> 
> On Fri, Nov 2, 2012 at 6:18 PM, Jack Howarth <howarth at bromo.med.uc.edu>wrote:
> 
> > Nick,
> >    Have you noticed that llvm/clang svn produces the following linker
> > warnings on
> > 'make check-all'?
> >
> > Linking CXX executable Debug/AsanTest
> > ld: warning: direct access in
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in non-virtual thunk to
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in non-virtual thunk to
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in non-virtual thunk to
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> > ld: warning: direct access in non-virtual thunk to
> > llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak
> > symbol vtable for llvm::convertible_fwd_ostream means the weak symbol
> > cannot be overridden at runtime. This was likely caused by different
> > translation units being compiled with different visibility settings.
> >
> 
> I'll take a look at this. However, tests below fail for a different reason
> (they don't use Debug/AsanTest at all).
> How do you configure a CMake build tree? Can you somehow get (or run
> manually) the script which is used
> for running log-path_test.cc and other failing test cases?

    The log-path_test.c failure appears to disappear if I don't run
'make -k check-all' under sudo. The other two failures, strncpy-overflow.cc
and use-after-free.cc, seem to be triggered by my use of a Debug build of
llvm/clang. When I use a Release build to run 'make -k check-all', no
failures are seen in the testsuite. I have opened PR14251 for these
strncpy-overflow.cc and use-after-free.cc AddressSanitizer failures
under Debug builds.
                   Jack

> 
> 
> >
> > I am seeing some AddressSanitizer failures like...
> >
> > FAIL: AddressSanitizer :: log-path_test.cc (13 of 12542)
> > ******************** TEST 'AddressSanitizer :: log-path_test.cc' FAILED
> > ********************
> >
> > FAIL: AddressSanitizer :: strncpy-overflow.cc (27 of 12542)
> > ******************** TEST 'AddressSanitizer :: strncpy-overflow.cc' FAILED
> > ********************
> >
> > FAIL: AddressSanitizer :: use-after-free.cc (34 of 12542)
> > ******************** TEST 'AddressSanitizer :: use-after-free.cc' FAILED
> > ********************
> >
> > etc, and wonder if they could be related to that those linkage warnings.
> > If so, I'll open a bug report.
> > Thanks in advance.
> >          Jack
> > ps This is using a debug build on x86_64-apple-darwin12 with Xcode 4.5.2's
> > linker.
> >
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> 
> 
> 
> -- 
> Alexey Samsonov, MSK



More information about the llvm-dev mailing list