LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 5149 - MIPS code generator crash when compiling GCC's _muldi3.o
Summary: MIPS code generator crash when compiling GCC's _muldi3.o
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: 2.6
Hardware: All All
: P normal
Assignee: Bruno Cardoso Lopes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-07 12:56 PDT by Felix Fietkau
Modified: 2010-03-06 13:59 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
Simplified test case (564 bytes, application/octet-stream)
2009-10-07 12:56 PDT, Felix Fietkau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Fietkau 2009-10-07 12:56:30 PDT
Created attachment 3623 [details]
Simplified test case

I hit the following failed assertion while trying to build a llvm-gcc mips cross compiler (llvm, llvm-gcc from the 2.6 release branch, r83451):

Assertion failed: (unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && "Invalid Object Idx!"), function setObjectOffset, file /Users/nbd/llvm/build_dir/host/llvm-2.6_r83451/include/llvm/CodeGen/MachineFrameInfo.h, line 281.
0   llc               0x0000000100bc6f92 std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::sys::Path*, std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> > >, llvm::sys::Path const&) + 8402
1   llc               0x0000000100bc7656 std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::sys::Path*, std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> > >, llvm::sys::Path const&) + 10134
2   libSystem.B.dylib 0x00007fff8332c14a _sigtramp + 26
3   libSystem.B.dylib 0x00007fff832d0caa tiny_malloc_from_free_list + 1196
4   libSystem.B.dylib 0x00007fff833a8104 __pthread_markcancel + 0
5   llc               0x000000010025dce2 llvm::MachineFrameInfo::setObjectOffset(int, long long) + 98
6   llc               0x0000000100931d2d llvm::DenseMap<llvm::VNInfo*, llvm::SmallPtrSet<llvm::MachineInstr*, 4u>, llvm::DenseMapInfo<llvm::VNInfo*>, llvm::DenseMapInfo<llvm::SmallPtrSet<llvm::MachineInstr*, 4u> > >::FindAndConstruct(llvm::VNInfo* const&) + 13213
7   llc               0x00000001008f7cdb llvm::sys::Path llvm::WriteGraph<llvm::MachineFunction const*>(llvm::MachineFunction const* const&, std::string const&, bool, std::string const&) + 2363
8   llc               0x0000000100b49faa llvm::FunctionPass::~FunctionPass() + 42906
9   llc               0x0000000100b4a614 llvm::FunctionPass::~FunctionPass() + 44548
10  llc               0x0000000100b4a952 llvm::FunctionPass::~FunctionPass() + 45378
11  llc               0x00000001000203b2 llvm::sys::SmartMutex<true>::release() + 24418
12  llc               0x000000010001e828 llvm::sys::SmartMutex<true>::release() + 17368
13  llc               0x0000000000000005 llvm::sys::SmartMutex<true>::release() + 4294859701
Stack dump:
0.      Program arguments: /Users/nbd/llvm/staging_dir/host/bin/llc -o bugpoint-test-program.bc.llc.s -f bugpoint-test-program.bc 
1.      Running pass 'Prolog/Epilog Insertion & Frame Finalization' on function '@__muldi3'
Comment 1 Chris Lattner 2009-11-04 23:44:30 PST
Bruno, any idea about this one?  It has a nice small testcase :)
Comment 2 Bruno Cardoso Lopes 2009-11-05 04:31:00 PST
I haven't looked yet, I'm traveling for some weeks now and I'll be back next week, I'll take a look then, thanks for the ping (this is simple and should be fixed) :)
Comment 3 Bruno Cardoso Lopes 2009-11-09 08:32:12 PST
Fixed in r86543
http://llvm.org/viewvc/llvm-project?rev=86543&view=rev