[llvm] r327359 - [LTO] Return proper error object rather than null LTOModule
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 19 10:00:01 PDT 2018
> On Mar 19, 2018, at 9:45 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> Given that you were fixing a crash - that speaks to the existence of a test failure? But perhaps only in a linker-plugin situation & that's what's proving difficult to port into the LLVM test environment?
Yep, no test failures. This happens as one of our tools checks a file for being BC.
> I'd suggest checking to see if llvm-lto2 can reproduce the same codepath & failure, perhaps?
I’ll poke around a bit more later, see if I can find something.
>
> On Mon, Mar 19, 2018 at 9:43 AM Adam Nemet <anemet at apple.com <mailto:anemet at apple.com>> wrote:
> I of course thought about that but I don’t know how. I was trying to get inspiration from the large patch that added the buggy code in r254721 but that didn’t add a single testcase either :(. I am open to hear ideas...
>
>> On Mar 19, 2018, at 9:23 AM, David Blaikie <dblaikie at gmail.com <mailto:dblaikie at gmail.com>> wrote:
>>
>> Test case?
>>
>> On Mon, Mar 12, 2018 at 9:39 PM Adam Nemet via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> Author: anemet
>> Date: Mon Mar 12 21:37:01 2018
>> New Revision: 327359
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=327359&view=rev <http://llvm.org/viewvc/llvm-project?rev=327359&view=rev>
>> Log:
>> [LTO] Return proper error object rather than null LTOModule
>>
>> This caused a crash in LTOModule::createInLocalContext.
>>
>> rdar://37926841 <>
>>
>> Modified:
>> llvm/trunk/lib/LTO/LTOModule.cpp
>>
>> Modified: llvm/trunk/lib/LTO/LTOModule.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=327359&r1=327358&r2=327359&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=327359&r1=327358&r2=327359&view=diff>
>> ==============================================================================
>> --- llvm/trunk/lib/LTO/LTOModule.cpp (original)
>> +++ llvm/trunk/lib/LTO/LTOModule.cpp Mon Mar 12 21:37:01 2018
>> @@ -208,7 +208,7 @@ LTOModule::makeLTOModule(MemoryBufferRef
>> std::string errMsg;
>> const Target *march = TargetRegistry::lookupTarget(TripleStr, errMsg);
>> if (!march)
>> - return std::unique_ptr<LTOModule>(nullptr);
>> + return make_error_code(object::object_error::arch_not_found);
>>
>> // construct LTOModule, hand over ownership of module and target
>> SubtargetFeatures Features;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180319/33e069d7/attachment-0001.html>
More information about the llvm-commits
mailing list