[LLVMbugs] [Bug 10148] New: llvm-ld aborts with "Aliasee not linked" on virtual destructors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 17 00:17:48 PDT 2011


           Summary: llvm-ld aborts with "Aliasee not linked" on virtual
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ka5427-536 at online.de
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=6743)
 --> (http://llvm.org/bugs/attachment.cgi?id=6743)
failing virtual destructor

I am working on a very large projects where llvm-ld aborts several 60 times
with the message  "Aliasee not linked".

It seems that the issue has somehow todo with virtual destructors.
(see attachment example.cpp/Makefile)

    class  Base {
            virtual ~Base() = 0;

    class Derived : public Base {
            virtual ~Derived();

    Base::~Base() { }

    Derived::~Derived() { }

    int main() {
        Derived d;

build output:

  clang++ -pedantic -Wall -emit-llvm -c example.cpp
  llvm-ld   example.o -o example
  llvm-ld: /home/eval/gnu/llvm/llvm/lib/Linker/LinkModules.cpp:675: bool
LinkAlias(llvm::Module*, const llvm::Module*, llvm::ValueToValueMapTy&,
std::string*): Assertion `VMI != Va
  0  llvm-ld         0x0000000000c79d56
  1  llvm-ld         0x0000000000c7a31c
  2  libpthread.so.0 0x00002b2e484f5a80
  3  libc.so.6       0x00002b2e490dfed5 gsignal + 53
  4  libc.so.6       0x00002b2e490e13f3 abort + 387
  5  libc.so.6       0x00002b2e490d8dc9 __assert_fail + 233
  6  llvm-ld         0x0000000000830a37
  7  llvm-ld         0x0000000000832ec2
llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, std::string*) + 2014
  8  llvm-ld         0x000000000082da03
llvm::Linker::LinkInModule(llvm::Module*, std::string*) + 41
  9  llvm-ld         0x000000000082ce32
llvm::Linker::LinkInFile(llvm::sys::Path const&, bool&) + 1486
  10 llvm-ld         0x000000000082d509
llvm::Linker::LinkInItems(std::vector<std::pair<std::string, bool>,
std::allocator<std::pair<std::string, bool> > > const&, std::vector<std:
  11 llvm-ld         0x0000000000806988 main + 1364
  12 libc.so.6       0x00002b2e490cc1a6 __libc_start_main + 230
  13 llvm-ld         0x00000000007ff609
  Stack dump:
  0.      Program arguments: llvm-ld example.o -o example
  gmake: *** [libexample.so] Aborted

more details:

  os is debian lenny 64bit
  llvm/clang++ is version 3.0 (trunk 133240)
  happens with virtual destructors only. Other virtual methods seems to work

  this is OK:  g++     -Wall -pedantic -o example example.cpp
  this is OK:  clang++ -Wall -pedantic -o example example.cpp

  the llvm-nm command reports a symbol of unknown type, e.g.:

     llvm-nm example.o | grep ' ? '

        ' ? _ZN7DerivedD1Ev'

    echo _ZN7DerivedD1Ev | c++filt


Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list