[llvm-bugs] [Bug 28485] New: Memory sanitizer brokenly compiled?

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 9 10:22:01 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28485

            Bug ID: 28485
           Summary: Memory sanitizer brokenly compiled?
           Product: Packaging
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: deb packages
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When i try to compile darktable with -fsanitize=memory, linking fails.          

[ 18%] Linking C shared library libdarktable.so
/usr/bin/ld: error:
/usr/lib/llvm-3.9/lib/clang/3.9.0/lib/linux/libclang_rt.msan_cxx-x86_64.a(msan_new_delete.cc.o):
requires dynamic R_X86_64_PC32 reloc against '_ZN6__msan11msan_initedE' which
may overflow at runtime; recompile with -fPIC


cmake call:                                                                     
LDFLAGS="-fsanitize=memory" CFLAGS="${LDFLAGS}" CXXFLAGS="${LDFLAGS}"
CPPFLAGS="${LDFLAGS}" CC=clang-3.9 CXX=clang++-3.9 cmake ../                    

make VERBOSE=1 shows that it tries to link to                                   
/usr/lib/llvm-3.9/lib/clang/3.9.0/lib/linux/libclang_rt.msan_cxx-x86_64.a       

I have tried looking for .so, but i see none in                                 
$ dpkg -L libclang-common-3.9-dev | grep msan | grep so

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160709/2393663f/attachment.html>


More information about the llvm-bugs mailing list