<div dir="ltr">Hi Peter,<div><br></div><div>Thank you for your reply. </div><div><br></div><div>I'm still having problems even after using cmake. Please see my comments below.</div><div><br></div><div class="gmail_extra">

<div class="gmail_quote">On Wed, May 7, 2014 at 4:16 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</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 Frederico,<br>
<div class=""><br>
On Wed, May 07, 2014 at 03:43:07PM -0500, Frederico Araujo wrote:<br>
> Hi,<br>
><br>
> I'm trying to compile the example program from the DataFlow Sanitizer page (<br>
> <a href="http://clang.llvm.org/docs/DataFlowSanitizer.html" target="_blank">http://clang.llvm.org/docs/DataFlowSanitizer.html</a>) without success. I<br>
> receive a number of errors when trying to compile the example with clang:<br>
><br>
> /> clang -fsanitize=dataflow -o labelprop labelprop.c<br>
</div>[...]<br>
<div class="">> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/Scrt1.o: In<br>
> function `_start':<br>
> (.text+0x20): undefined reference to `main'<br>
</div>[...]<br>
<div class="">> /tmp/labelprop-bfe82e.o: In function `dfs$main':<br>
> labelprop.c:(.text+0x78): undefined reference to `dfs$dfsan_create_label'<br>
<br>
</div>It looks like DFSan wasn't able to find the ABI list file. Unfortunately<br>
only the CMake build system currently supports building the ABI list.<br>
Can you please try again with CMake?<br></blockquote><div><br></div><div>I created this simple CMake list file:</div><div><div><br></div><div>cmake_minimum_required (VERSION 2.6)</div><div>project (EXAMPLE)</div><div>add_executable(labelprop labelprop.c)</div>

<div>SET (CMAKE_C_COMPILER   "/usr/bin/clang")</div><div>SET (CMAKE_C_FLAGS "-fsanitize=dataflow")</div></div><div><br></div><div>After building the project with the above configuration, I still get the same errors as before. Anything missing? Perhaps I should say that I'm new to cmake :)</div>

<div>I forgot to ask in my first email: is there any step-by-step instructions on how to compile and get the dataflow sanitizer example working?</div><div> </div><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 class=""><br>
> /usr/local/llvm/build/Debug+Asserts/bin/../lib/clang/3.5.0/lib/linux/libclang_rt.dfsan-x86_64.a(sanitizer_deadlock_detector1.o):(.data.rel.ro._ZTIN11__sanitizer9DDetectorE[_ZTIN11__sanitizer9DDetectorE]+0x0):<br>
> undefined reference to `vtable for __cxxabiv1::__class_type_info'<br>
<br>
</div>This would appear to indicate that your sanitizer runtimes were built with<br>
RTTI, which is a little surprising. Did you do anything in particular to<br>
enable RTTI?<br></blockquote><div><br></div><div>Well, no. I just followed the instructions on the clang webpage on how to compile llvm and clang. I used the trunk versions of everything. I also compiled the optional projects. Could it be the -fsanitizer-dataflow option?</div>

<div> </div><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">
<br>
Thanks,<br>
<span class=""><font color="#888888">--<br>
Peter<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Thanks!</div><div class="gmail_extra">Frederico</div></div>