[lld] r280291 - Initialize RelativeRel for AMDGPU.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 10:50:06 PDT 2016


I think it is worse than using msan because if you initialize a variable
with a dummy value and forget to set to a correct value, you'll get a
mysterious error, and msan can't help debugging.

On Thu, Sep 8, 2016 at 8:28 PM, Sean Silva <chisophugis at gmail.com> wrote:

> Can you add an assertion that would catch this without msan? (e.g.
> initialize to a sentinel value and assert that the target overrides it)
>
> -- Sean Silva
>
> On Wed, Aug 31, 2016 at 2:04 PM, Rui Ueyama via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: ruiu
>> Date: Wed Aug 31 16:04:25 2016
>> New Revision: 280291
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=280291&view=rev
>> Log:
>> Initialize RelativeRel for AMDGPU.
>>
>> Target->RelativeRel is used for all platforms, but AMDGPU did
>> not send that member.
>>
>> Fixes bug 30227 - RelativeRel is used, but not initialized for AMDGPU.
>>
>> Differential Revision: https://reviews.llvm.org/D24100
>>
>> Modified:
>>     lld/trunk/ELF/Target.cpp
>>
>> Modified: lld/trunk/ELF/Target.cpp
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp
>> ?rev=280291&r1=280290&r2=280291&view=diff
>> ============================================================
>> ==================
>> --- lld/trunk/ELF/Target.cpp (original)
>> +++ lld/trunk/ELF/Target.cpp Wed Aug 31 16:04:25 2016
>> @@ -1457,6 +1457,7 @@ void AArch64TargetInfo::relaxTlsIeToLe(u
>>  }
>>
>>  AMDGPUTargetInfo::AMDGPUTargetInfo() {
>> +  RelativeRel = R_AMDGPU_REL64;
>>    GotRel = R_AMDGPU_ABS64;
>>    GotEntrySize = 8;
>>  }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> 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/20160909/d3ba1015/attachment.html>


More information about the llvm-commits mailing list