[llvm-dev] Build failure
Florian Hahn via llvm-dev
llvm-dev at lists.llvm.org
Sun Jan 10 07:48:29 PST 2021
> On Jan 8, 2021, at 18:18, Paul C. Anagnostopoulos <paul at windfall.com> wrote:
>
> At 1/8/2021 01:08 PM, Florian Hahn wrote:
>
>>> Can I trust this message?
>>
>> Yes, you should be able to trust this message.
>>
>> The bot builds LLVM with the undefined behavior sanitizer, which will insert runtime checks to catch cases of undefined behavior in the source. You need a version of LLVM that is build with the UBsan enabled to reproduce it.
>>
>>> TGParser.cpp:3213:22: runtime error: reference binding to null pointer of type 'llvm::Record'
>>
>> Looks like the code on that line is https://github.com/llvm/llvm-project/blob/6e2b6351d2cb1feaa88e6c92ba844ab48b4758f9/llvm/lib/TableGen/TGParser.cpp#L3213
>>
>> RecordResolver R(*CurRec);
>>
>> CurRec is a pointer of type llvm::Record. The message ("runtime error: reference binding to null pointer of type 'llvm::Recordâ) is indicating that a null pointer is de-referenced (so it can be bound to a reference, likely RecordResolverâs constructor takes an argument `Record &`).
>>
>> So there is a code path executed where CurRec is a nullptr.
>
> I did indeed find the bug in that line of code. But that is line 3212 in my file. . . . Ah, that's because that build isn't using the file I patched to eliminate the spurious Loc declaration. Okay, that makes sense.
>
> I will push a patch to fix this. Sorry for the mess but thanks for the help!
>
>
No worries, glad you figured out the issue!
More information about the llvm-dev
mailing list