<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 9, 2015 at 9:41 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Sep 9, 2015 at 12:57 AM, AlexDenisov via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi there.<br>
<br>
I’m trying to use LibFuzzer on OSX and face some issues:<br>
I checked out LibFuzzer documentation[1] and managed to proceed until the final step of the first example.<br>
Now I see linker errors related to dfsan, dfsan’s documentation[2] states explicitly “DataFlowSanitizer is a work in progress, currently under development for x86_64 Linux.”.<br></blockquote><div><br></div></span><div>Yes, libFuzzer does not build on OSX today. </div><div>Marshall (CC-ed) has managed to make it work with a couple of #ifdefs in FuzzerTraceState.cpp. </div><div><br></div></div></div></div></blockquote><div><br></div><div>Actually, all I did was implement an empty DF sanitizer :-)</div><div><br></div><div><span class="" style="white-space:pre">     </span>extern "C" {</div><div><br></div><div><span class="" style="white-space:pre">    </span>typedef uint16_t dfsan_label;</div><div><br></div><div><span class="" style="white-space:pre">     </span>struct dfsan_label_info {</div><div><span class="" style="white-space:pre">  </span>  // Fields for union labels, set to 0 for base labels.</div><div><span class="" style="white-space:pre">   </span>  dfsan_label l1;</div><div><span class="" style="white-space:pre"> </span>  dfsan_label l2;</div><div><br></div><div><span class="" style="white-space:pre">        </span>  // Fields for base labels.</div><div><span class="" style="white-space:pre">      </span>  const char *desc;</div><div><span class="" style="white-space:pre">       </span>  void *userdata;</div><div><span class="" style="white-space:pre"> </span>};</div><div><br></div><div><span class="" style="white-space:pre">        </span>dfsan_label dfsan_create_label(const char *desc, void *userdata) { return 0; }</div><div><br></div><div><span class="" style="white-space:pre">    </span>const struct dfsan_label_info *dfsan_get_label_info(dfsan_label label) { return NULL; }</div><div><span class="" style="white-space:pre">    </span>dfsan_label dfsan_read_label(const void *addr, size_t size) { return 0; }</div><div><span class="" style="white-space:pre">  </span>void dfsan_set_label(dfsan_label label, void *addr, size_t size) {}</div><div><br></div><div><span class="" style="white-space:pre">       </span>}</div><div><br></div><div> </div></div><div class="gmail_extra"><span style="white-space:pre"> </span>extern "C" void LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {...}</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- Marshall</div><div><br></div></div></div>