[LLVMbugs] [Bug 11041] New: llvm-link crashes when linking to bytecode files
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 29 15:39:28 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11041
Summary: llvm-link crashes when linking to bytecode files
Product: tools
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: llvm-link
AssignedTo: unassignedbugs at nondot.org
ReportedBy: dominic.letz at berlin.de
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7375)
--> (http://llvm.org/bugs/attachment.cgi?id=7375)
.bc files for reproduction
When compiling scummvm1.3.1 using llvm and emiting bytecode only llvm crashes
on linking
engines/gob/sound/adlib.o and engines/gob/sound/pcspeaker.o (actually being .bc
files but having .o ending because of the used Makefile)
Command line:
llvm-link -S -o engines/gob/libgob.a engines/gob/sound/pcspeaker.o
engines/gob/sound/adlib.o
Issue seems to be that in LinkModules.cpp:682 "DAliasee" is actuall 0:
<code>
// Fixup aliases to bitcasts. Note that aliases to GEPs are still broken
// by this, but aliases to GEPs are broken to a lot of other things, so
// it's less important.
Constant *DAliaseeConst = DAliasee;
if (SGA->getType() != DAliasee->getType()) <== CRASH
DAliaseeConst = ConstantExpr::getBitCast(DAliasee, SGA->getType());
</code>
Stacktrace:
#0 0x0000000000428a1e in llvm::PATypeHolder::get (this=0x10) at
/home/dominic/emscripten/llvm/include/llvm/Type.h:507
#1 0x0000000000427692 in llvm::PATypeHolder::operator llvm::Type* (this=0x10)
at /home/dominic/emscripten/llvm/include/llvm/AbstractTypeUser.h:159
#2 0x00000000004279c2 in llvm::Value::getType (this=0x0) at
/home/dominic/emscripten/llvm/include/llvm/Value.h:110
#3 0x0000000000427bca in llvm::GlobalValue::getType (this=0x0) at
/home/dominic/emscripten/llvm/include/llvm/GlobalValue.h:110
#4 0x000000000046361c in LinkAlias (Dest=0x8b13e0, Src=0x8b1750, ValueMap=...,
Err=0x7fffffffe070) at LinkModules.cpp:682
#5 0x00000000004663f6 in llvm::Linker::LinkModules (Dest=0x8b13e0,
Src=0x8b1750, ErrorMsg=0x7fffffffe070) at LinkModules.cpp:1270
#6 0x0000000000406d54 in main (argc=6, argv=0x7fffffffe188) at
llvm-link.cpp:106
--
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