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 998 - llvm-ld infinite loop on bc archive
Summary: llvm-ld infinite loop on bc archive
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-ld (show other bugs)
Version: 1.4
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: quality-of-implementation
Depends on:
Blocks:
 
Reported: 2006-11-10 14:45 PST by Scott Michel
Modified: 2010-02-22 12:42 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
llvm-ld infinite bc archive loop and native code gen fix. (9.27 KB, patch)
2006-11-10 14:46 PST, Scott Michel
Details
updated patch with fewer calories (7.74 KB, patch)
2006-11-10 17:11 PST, Scott Michel
Details
A couple of more suggested refinements... (8.71 KB, patch)
2006-11-10 17:23 PST, Scott Michel
Details
fix typo... (8.74 KB, patch)
2006-11-10 17:34 PST, Scott Michel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Michel 2006-11-10 14:45:09 PST
llvm-ld can (and did) go into an infinite loop while processing a bytecode 
archive. Cleaned up the loop in LinkArchive.cpp -- it shouldn't be an infinite 
loop. The code should have implemented a loop that keeps processing this 
archive until the set of undefined symbols doesn't change.

Also, bytecode archives improperly get fed to the native linker. At least Linux 
bitches about malformed archives when this happens, YMMV.
Comment 1 Scott Michel 2006-11-10 14:46:05 PST
Created attachment 458 [details]
llvm-ld infinite bc archive loop and native code gen fix.
Comment 2 Reid Spencer 2006-11-10 15:16:36 PST
Reid is reviewing this patch.
Comment 3 Scott Michel 2006-11-10 17:11:36 PST
Created attachment 459 [details]
updated patch with fewer calories
Comment 4 Scott Michel 2006-11-10 17:23:36 PST
Created attachment 460 [details]
A couple of more suggested refinements...
Comment 5 Scott Michel 2006-11-10 17:34:54 PST
Created attachment 461 [details]
fix typo...