<div dir="ltr">+pcc , glider<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 12:59 PM, Juan Ceasar <span dir="ltr"><<a href="mailto:juan.d.ceasar@gmail.com" target="_blank">juan.d.ceasar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Afternoon,<div><br></div><div>I had an issue with trying to link a program with the DataFlowSanitizer functionality, this is from the libFuzzer project, and I was seeing:</div><div><br></div><div><div style="font-size:13px">clang++ -fsanitize=address -fsanitize-coverage=edge test_fuzzer.cc Fuzzer*.o</div><div style="font-size:13px"><br></div><div style="font-size:13px">Undefined symbols for architecture x86_64:</div><div style="font-size:13px"><br></div><div style="font-size:13px">  "_dfsan_create_label", referenced from:</div><div style="font-size:13px"><br></div><div style="font-size:13px">      fuzzer::TraceState::DFSanCmpCallback(unsigned long, unsigned long, unsigned long, unsigned long long, unsigned long long, unsigned short, unsigned short) in FuzzerTraceState.o</div><div style="font-size:13px"><br></div><div style="font-size:13px">      fuzzer::Fuzzer::InitializeTraceState() in FuzzerTraceState.o</div><div style="font-size:13px"><br></div><div style="font-size:13px">  "_dfsan_get_label_info", referenced from:</div><div style="font-size:13px"><br></div><div style="font-size:13px">      fuzzer::TraceState::GetLabelRange(unsigned short) in FuzzerTraceState.o</div><div style="font-size:13px"><br></div></div><div style="font-size:13px">  .....</div><div><br></div><div>But then looking at the docs: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_docs_DataFlowSanitizer.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=DuYBrpgYwv8YGoYjC8o5HfU49LwQXqvyVTXIABWvtTE&s=K41EpstDp6NwFwwzmrjj5-HivCd-_5Gt8Jr-Zyc7nxQ&e=" target="_blank">http://clang.llvm.org/docs/DataFlowSanitizer.html</a></div><div><br></div><div>It appears that this is only supported under Linux?  Is that right?  </div><div><br></div></div></blockquote><div><br></div><div>Correct. AFAICT, DFSan was only tested on Linux. </div><div>It is quite hard to make it work on Mac because there are too many closed source libraries there. </div><div>Nothing impossible though -- it's just that nobody has worked on it. </div><div><br></div><div>libFuzzer was also never tested on Mac, but I think it should be trivial to make it work there. </div><div>I suspect that the errors you see are caused by the weak function declarations which don't (???) work on Mac. </div><div>You'll need to #ifdef the weak functions on Mac somehow. Patches and Mac buildbots are welcome :) </div><div><br></div><div>--kcc  </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>