[cfe-dev] Problem linking example program with DataFlow Sanitizer
Peter Collingbourne
peter at pcc.me.uk
Wed May 7 14:16:07 PDT 2014
Hi Frederico,
On Wed, May 07, 2014 at 03:43:07PM -0500, Frederico Araujo wrote:
> Hi,
>
> I'm trying to compile the example program from the DataFlow Sanitizer page (
> http://clang.llvm.org/docs/DataFlowSanitizer.html) without success. I
> receive a number of errors when trying to compile the example with clang:
>
> /> clang -fsanitize=dataflow -o labelprop labelprop.c
[...]
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/Scrt1.o: In
> function `_start':
> (.text+0x20): undefined reference to `main'
[...]
> /tmp/labelprop-bfe82e.o: In function `dfs$main':
> labelprop.c:(.text+0x78): undefined reference to `dfs$dfsan_create_label'
It looks like DFSan wasn't able to find the ABI list file. Unfortunately
only the CMake build system currently supports building the ABI list.
Can you please try again with CMake?
> /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):
> undefined reference to `vtable for __cxxabiv1::__class_type_info'
This would appear to indicate that your sanitizer runtimes were built with
RTTI, which is a little surprising. Did you do anything in particular to
enable RTTI?
Thanks,
--
Peter
More information about the cfe-dev
mailing list