[LLVMdev] Fix crash in gold LTO plugin
quantum.skyline at gmail.com
Mon Jul 25 20:13:50 PDT 2011
While doing research using the LLVM link time optimizer, we discovered
a bug in the LTO plugin. After running the passes, the plugin tries to
tell gold about 0 symbols produced from a bitcode file, indexing an
empty vector in the expression &I->syms. We're not completely sure
if this is the best patch or if it is a symptom of a larger problem,
but it worked for us. When we found this, all of the input bitcode
files had at least one symbol before running passes.
The attached patch for 2.9 places a guard around the calls to the
callback to only report symbols when the vector of symbols in the
claimed_file is nonempty.
Full credit for discovery and the patch goes to Jeffrey Bosboom.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1142 bytes
Desc: not available
More information about the llvm-dev