[LLVMbugs] [Bug 2054] New: llvm-ld crashes with Assertion `0 && "Unmapped global?"' failed. when linking code with weakrefs on linux amd64

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Feb 17 13:51:59 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=2054

           Summary: llvm-ld crashes with Assertion `0 && "Unmapped global?"'
                    failed. when linking code with weakrefs on linux amd64
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: belyshev at depni.sinp.msu.ru
                CC: llvmbugs at cs.uiuc.edu


Testcase:

int foo;
static int bar __attribute__ ((weakref ("foo")));

int baz (void) 
{
  return bar;
}

$ gcc -emit-llvm -c bug.c           
$ llvm-ld bug.o
llvm-ld: LinkModules.cpp:309: llvm::Value* RemapOperand(const llvm::Value*,
std::map<const llvm::Value*, llvm::Value*, std::less<const llvm::Value*>,
std::allocator<std::pair<const llvm::Value* const, llvm::Value*> > >&):
Assertion `0 && "Unmapped global?"' failed.
llvm-ld[0x66e0a1]
/lib/libc.so.6[0x7f5ba9692240]
/lib/libc.so.6(gsignal+0x35)[0x7f5ba96921d5]
/lib/libc.so.6(abort+0x110)[0x7f5ba9693680]
/lib/libc.so.6(__assert_fail+0xef)[0x7f5ba968b75f]
llvm-ld[0x4a3671]
llvm-ld[0x4a397e]
llvm-ld(_ZN4llvm6Linker11LinkModulesEPNS_6ModuleES2_PSs+0x9f4)[0x4a7e44]
llvm-ld(_ZN4llvm6Linker10LinkInFileERKNS_3sys4PathERb+0x3ce)[0x4a02ce]
llvm-ld(_ZN4llvm6Linker11LinkInItemsERKSt6vectorISt4pairISsbESaIS3_EERS5_+0xd9)[0x4a1049]
llvm-ld(main+0x9b3)[0x4851d3]
/lib/libc.so.6(__libc_start_main+0xf4)[0x7f5ba967f1c4]
llvm-ld(sinh+0x41)[0x47da29]
Abort 
$

gcc version is: gcc version 4.2.1 (Based on Apple Inc. build 5546) (LLVM build)
llvm version is: trunk r47234
platform is: linux amd64 (x86_64-unknown-linux-gnu)


-- 
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