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

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 17:39:52 PDT 2016


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?

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/
> FuzzerTracePC.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/f2f7e708/attachment.html>


More information about the llvm-commits mailing list