[llvm] r342845 - [Aarch64] Fix memcpy that was copying 4x too many bytes

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 20:50:25 PDT 2018


cool - thanks!

On Mon, Sep 24, 2018 at 8:24 PM Benjamin Kramer <benny.kra at gmail.com> wrote:

> There were failures in "make check", the asan buildbot picked it up.
>
> On Mon, Sep 24, 2018 at 7:43 PM David Blaikie <dblaikie at gmail.com> wrote:
>
>> Does this fail on existing running/checked in tests with asan? (or only
>> on some other workload)
>>
>> On Sun, Sep 23, 2018 at 11:44 AM Benjamin Kramer via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> Author: d0k
>>> Date: Sun Sep 23 11:43:28 2018
>>> New Revision: 342845
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=342845&view=rev
>>> Log:
>>> [Aarch64] Fix memcpy that was copying 4x too many bytes
>>>
>>> Found by asan.
>>>
>>> Modified:
>>>     llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp
>>>
>>> Modified: llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp?rev=342845&r1=342844&r2=342845&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp (original)
>>> +++ llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp Sun Sep 23
>>> 11:43:28 2018
>>> @@ -143,7 +143,7 @@ void AArch64RegisterInfo::UpdateCustomCa
>>>                                                   const uint32_t **Mask)
>>> const {
>>>    uint32_t *UpdatedMask = MF.allocateRegMask();
>>>    unsigned RegMaskSize = MachineOperand::getRegMaskSize(getNumRegs());
>>> -  memcpy(UpdatedMask, *Mask, sizeof(Mask[0]) * RegMaskSize);
>>> +  memcpy(UpdatedMask, *Mask, sizeof(UpdatedMask[0]) * RegMaskSize);
>>>
>>>    for (size_t i = 0; i < AArch64::GPR64commonRegClass.getNumRegs();
>>> ++i) {
>>>      if (MF.getSubtarget<AArch64Subtarget>().isXRegCustomCalleeSaved(i))
>>> {
>>>
>>>
>>> _______________________________________________
>>> 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/20180924/4b484510/attachment.html>


More information about the llvm-commits mailing list