[llvm] b198016 - [ORC] Fix an overly aggressive assert.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 12:08:59 PDT 2020
Yep yep - looks like readding the assert does fail
ExecutionEngine/JITLink/X86/MachO_weak_definitions.s now.
On Fri, Apr 10, 2020 at 10:05 AM Lang Hames <lhames at gmail.com> wrote:
> Hi Dave,
>
> I think I broke this out of the global initializers patch as it was
> getting large already: it's exercised by the tests for that (which were
> committed later) but there's nothing targeted for this.
>
> -- Lang.
>
> On Wed, Mar 25, 2020 at 12:29 PM David Blaikie <dblaikie at gmail.com> wrote:
>
>> Does this have test coverage?
>>
>> On Wed, Mar 11, 2020 at 8:05 PM Lang Hames via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>>
>>> Author: Lang Hames
>>> Date: 2020-03-11T20:04:54-07:00
>>> New Revision: b19801640bf621a596187d819afb57514713d1e7
>>>
>>> URL:
>>> https://github.com/llvm/llvm-project/commit/b19801640bf621a596187d819afb57514713d1e7
>>> DIFF:
>>> https://github.com/llvm/llvm-project/commit/b19801640bf621a596187d819afb57514713d1e7.diff
>>>
>>> LOG: [ORC] Fix an overly aggressive assert.
>>>
>>> It is ok to add dependencies on symbols that are ready, they should just
>>> be
>>> skipped.
>>>
>>> Added:
>>>
>>>
>>> Modified:
>>> llvm/lib/ExecutionEngine/Orc/Core.cpp
>>>
>>> Removed:
>>>
>>>
>>>
>>>
>>> ################################################################################
>>> diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp
>>> b/llvm/lib/ExecutionEngine/Orc/Core.cpp
>>> index ef4ab1e68c02..49b7395843a5 100644
>>> --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp
>>> +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp
>>> @@ -1001,16 +1001,18 @@ void JITDylib::addDependencies(const
>>> SymbolStringPtr &Name,
>>> // Check the sym entry for the dependency.
>>> auto OtherSymI = OtherJITDylib.Symbols.find(OtherSymbol);
>>>
>>> -#ifndef NDEBUG
>>> // Assert that this symbol exists and has not reached the ready
>>> state
>>> // already.
>>> assert(OtherSymI != OtherJITDylib.Symbols.end() &&
>>> - (OtherSymI->second.getState() < SymbolState::Ready &&
>>> - "Dependency on emitted/ready symbol"));
>>> -#endif
>>> + "Dependency on unknown symbol");
>>>
>>> auto &OtherSymEntry = OtherSymI->second;
>>>
>>> + // If the other symbol is already in the Ready state then there's
>>> no
>>> + // dependency to add.
>>> + if (OtherSymEntry.getState() == SymbolState::Ready)
>>> + continue;
>>> +
>>> // If the dependency is in an error state then note this and
>>> continue,
>>> // we will move this symbol to the error state below.
>>> if (OtherSymEntry.getFlags().hasError()) {
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> https://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/20200413/3f2be5ae/attachment.html>
More information about the llvm-commits
mailing list