[llvm] r285259 - [libFuzzer] speculatively trying to fix the Mac build

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 17:44:13 PDT 2016


On Wed, Oct 26, 2016 at 5:39 PM, Peter Collingbourne <peter at pcc.me.uk>
wrote:

> Drive by comment: maybe you want something like
>
> if (sizeof(T) == 4)
>   TORC4.Insert(ArgXor, Arg1, Arg2);
> else if sizeof(T) == 8)
>   TORC8.Insert(ArgXor, Arg1, Arg2);
>
> in TracePC::HandleCmp?
>

Hmmm. This will cause Arg1 to be passed to functions with wrong parameters
under if(0).
But seems to work with both g++ and clang.. testing..


>
> On Wed, Oct 26, 2016 at 5:22 PM, Kostya Serebryany via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: kcc
>> Date: Wed Oct 26 19:22:39 2016
>> New Revision: 285259
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=285259&view=rev
>> Log:
>> [libFuzzer] speculatively trying to fix the Mac build
>>
>> Modified:
>>     llvm/trunk/lib/Fuzzer/FuzzerTracePC.h
>>
>> Modified: llvm/trunk/lib/Fuzzer/FuzzerTracePC.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/Fu
>> zzerTracePC.h?rev=285259&r1=285258&r2=285259&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Fuzzer/FuzzerTracePC.h (original)
>> +++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.h Wed Oct 26 19:22:39 2016
>> @@ -111,7 +111,7 @@ private:
>>      // Do nothing, too small to be interesting.
>>    }
>>    void TORCInsert(size_t Idx, uint16_t Arg1, uint16_t Arg2) {
>> -    // Do nothing, these don't usually hapen.
>> +    // Do nothing, these don't usually happen.
>>    }
>>    void TORCInsert(size_t Idx, uint32_t Arg1, uint32_t Arg2) {
>>      TORC4.Insert(Idx, Arg1, Arg2);
>> @@ -119,6 +119,9 @@ private:
>>    void TORCInsert(size_t Idx, uint64_t Arg1, uint64_t Arg2) {
>>      TORC8.Insert(Idx, Arg1, Arg2);
>>    }
>> +  void TORCInsert(size_t Idx, uintptr_t Arg1, uintptr_t Arg2) {
>> +    TORC8.Insert(Idx, Arg1, Arg2);
>> +  }
>>
>>    static const size_t kNumPCs = 1 << 24;
>>    uintptr_t PCs[kNumPCs];
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
>
> --
> --
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161026/3ab8a5be/attachment.html>


More information about the llvm-commits mailing list