[PATCH] D79140: [ThinLTO] return error instead of crashing on invalid input
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 07:56:47 PST 2020
tejohnson added a comment.
In D79140#2392732 <https://reviews.llvm.org/D79140#2392732>, @trofi wrote:
> In D79140#2391922 <https://reviews.llvm.org/D79140#2391922>, @tejohnson wrote:
>
>> Please address the earlier suggestions (needs a test case
>
> The failure looks like a low-level profile ID mismatch when merging profiles obtained when running tests against slightly different sources. I'll need some help on how I can craft the equivalent using `lit` mechanism. Original 40MB compressed input to `lld` is at https://bugs.llvm.org/show_bug.cgi?id=45636#c1 if it's of any help.
There is already a test for this particular error message in llvm/test/Linker/module-flags-6-a.ll. It uses llvm-link. Presumably you can use the same input files but invoke via lld to test?
>> and also agree it might be nice to have the message suggest stale objects as possible culprit).
>
> DR description provides new error message as:
>
> """
> ld.lld: error: Function Import: link error:
>
> linking module flags 'ProfileSummary':
> IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o'
>
> """
>
> can you suggest how it should be amended instead?
The error message that should be changed ("IDs have conflicting values") is coming from in llvm/lib/Linker/IRMover.cpp. Maybe change it to something like "IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o' (possible use of stale object files)"? Outside of development it seems as though this would only happen in the stale object case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79140/new/
https://reviews.llvm.org/D79140
More information about the llvm-commits
mailing list