[cfe-dev] clang dataflow sanitizer vs. shared objects

Bhargava Shastry bshastry at sec.t-labs.tu-berlin.de
Sun Feb 22 16:27:04 PST 2015


Hello all,

Following up on this thread: Found that Peter's instructions to get
dfsan support in libcxx/libcxxabi [1] does not work on latest upstream
commits (LLVM: 1f22900; Clang: 3457cd5; compiler-rt: 7bbc72c; libcxx:
da1818a; libcxxabi: 75a7bf6).

I have attached the stack trace with diagnostics. Basically, an
assertion fails here:
> lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1404: void
> {anonymous}::DFSanVisitor::visitCallSite(llvm::CallSite): Assertion
> `!(cast<FunctionType>(
> CS.getCalledValue()->getType()->getPointerElementType())->isVarArg()
> && dyn_cast<InvokeInst>(CS.getInstruction()))' failed.

Pointers are much appreciated.

Thanks,
Bhargava

[1]: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-January/040895.html

On 02/05/2015 05:04 PM, Christian Convey wrote:
> Yury, thanks, that's an interesting idea.
>
> Speaking only for myself, I think the ideal behavior would be the
> following, assuming there's a reasonable way to implement it:
>
> (1) Libraries (both static and dynamic) provide both a normal and
> dfs-enabled version of each exported function.
>
> (2) The compiler and linker work together so that a function call site
> calls the dfs-enabled version of the target function if and only if
> the caller was also compiled with dfs.
>
> I realize this is non-trivial for a few reasons, I'm just thinking
> about what my ideal endpoint would be.
>
> On Thu, Feb 5, 2015 at 12:37 AM, Yury Gribov <y.gribov at samsung.com
> <mailto:y.gribov at samsung.com>> wrote:
>
>     On 02/05/2015 01:23 AM, Peter Collingbourne wrote:
>
>         On Wed, Feb 04, 2015 at 02:56:03PM -0500, Christian Convey wrote:
>
>             Hi guys,
>
>             I'm running into some pain with dataflow sanitizer, and
>             I'm wondering
>             anyone's found a good work-around.
>
>             I'm trying to analyze a code base which delegates a lot of
>             functionality to
>             shared objects.  The application looks up functions within
>             the .so using
>             hard-coded function names.  For example, "dlsym(..., "foo" );"
>
>             Unfortunately for me, the dataflow sanitizer prepends
>             "dfsw$" to the name
>             of any function compiled with the dataflow sanitizer
>             enabled.  So if
>             function "foo" was compiled with the sanitizer enabled,
>             I'd need to change
>             these dlsym invocations to something like "dlsym(...,
>             "dfsw$foo");"
>
>             For now, I'm just black-listing ( via -fsanitize-blacklist
>             ) every function
>             that's exported by one of the application's shared
>             objects.  This addresses
>             the symbol lookup problem, but it means my dataflow labels
>             are lost on data
>             transmitted through these black-listed functions.
>
>             Does anyone know of a good workaround to this problem,
>             and/or what a
>             longer-term solution might look like?
>
>
>         I'm not aware of a good solution to this problem at the
>         moment. One possibility
>         is to write a custom wrapper for the dlsym function that tries
>         the symbol
>         name both with and without the "dfs$" prefix, but this would
>         potentially
>         allow uninstrumented function pointers to leak into the program.
>
>
>     Using --defsym to create aliases during linking is another option.
>     Perhaps DFSan should do this itself?
>
>     -Y
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- 
Learn more about COSADE 2015, the 6th Conference on
Constructive Side Channel Analysis and Secure Design
http://www.cosade.org

Bhargava Shastry <bshastry at sec.t-labs.tu-berlin.de>
Security in Telecommunications
TU Berlin / Telekom Innovation Laboratories
Ernst-Reuter-Platz 7, Sekr TEL 17 / D - 10587 Berlin, Germany
phone: +49 30 8353 58235

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150223/f424c184/attachment.html>
-------------- next part --------------
[1/22] Building CXX object projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o
[2/22] Building CXX object projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o
[3/22] Building CXX object projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/bind.cpp.o
[4/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_aux_runtime.cpp.o
[5/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_default_handlers.cpp.o
[6/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_demangle.cpp.o
[7/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_exception.cpp.o
[8/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_exception_storage.cpp.o
[9/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_guard.cpp.o
[10/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o
[11/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_new_delete.cpp.o
[12/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_personality.cpp.o
[13/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_unexpected.cpp.o
[14/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_vector.cpp.o
[15/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_virtual.cpp.o
[16/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/exception.cpp.o
[17/22] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi.dir/private_typeinfo.cpp.o
FAILED: /home/bhargava/workspace/llvm/bin/clang++   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fsanitize=dataflow -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -std=c++11 -Iprojects/libcxx/lib -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/lib -Iinclude -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include    -nostdinc++ -Wall -Werror=return-type -W -Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wno-error -pedantic -D_DEBUG -D_LIBCPP_BUILD_STATIC -fPIC -MMD -MT projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o -MF projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o.d -o projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o -c /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:118:9: warning: #warning is a language extension [-Wpedantic]
#       warning uncaught_exception not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:118:9: warning: uncaught_exception not yet implemented [-W#warnings]
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:191:9: warning: #warning is a language extension [-Wpedantic]
#       warning exception_ptr not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:191:9: warning: exception_ptr not yet implemented [-W#warnings]
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:210:9: warning: #warning is a language extension [-Wpedantic]
#       warning exception_ptr not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:210:9: warning: exception_ptr not yet implemented [-W#warnings]
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:235:9: warning: #warning is a language extension [-Wpedantic]
#       warning exception_ptr not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:235:9: warning: exception_ptr not yet implemented [-W#warnings]
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:279:9: warning: #warning is a language extension [-Wpedantic]
#       warning exception_ptr not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:279:9: warning: exception_ptr not yet implemented [-W#warnings]
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:301:9: warning: #warning is a language extension [-Wpedantic]
#       warning exception_ptr not yet implemented
        ^
/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp:301:9: warning: exception_ptr not yet implemented [-W#warnings]
clang-3.6: /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1404: void {anonymous}::DFSanVisitor::visitCallSite(llvm::CallSite): Assertion `!(cast<FunctionType>( CS.getCalledValue()->getType()->getPointerElementType())->isVarArg() && dyn_cast<InvokeInst>(CS.getInstruction()))' failed.
#0 0x1bc11a4 llvm::sys::PrintStackTrace(_IO_FILE*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:423:0
#1 0x1bc143f PrintStackTraceSignalHandler(void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:481:0
#2 0x1bc0100 SignalHandler(int) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:198:0
#3 0x7fcc5b588cb0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x7fcc5a7c40d5 gsignal /build/buildd/eglibc-2.15/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:64:0
#5 0x7fcc5a7c783b abort /build/buildd/eglibc-2.15/stdlib/abort.c:93:0
#6 0x7fcc5a7bcd9e __assert_fail_base /build/buildd/eglibc-2.15/assert/assert.c:55:0
#7 0x7fcc5a7bce42 (/lib/x86_64-linux-gnu/libc.so.6+0x2ee42)
#8 0x2408343 (anonymous namespace)::DFSanVisitor::visitCallSite(llvm::CallSite) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1406:0
#9 0x241018e llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvokeInst(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:225:0
#10 0x240dce5 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvoke(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#11 0x240bd07 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#12 0x240a68d llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:114:0
#13 0x2404a35 (anonymous namespace)::DataFlowSanitizer::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:821:0
#14 0x1800e66 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1616:0
#15 0x1801514 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1723:0
#16 0x1801733 llvm::legacy::PassManager::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1757:0
#17 0x214a737 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:636:0
#18 0x214a85f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:657:0
#19 0x212c8e4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:178:0
#20 0x25ef7d2 clang::ParseAST(clang::Sema&, bool, bool) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Parse/ParseAST.cpp:153:0
#21 0x1db595e clang::ASTFrontendAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:539:0
#22 0x212ee1f clang::CodeGenAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:734:0
#23 0x1db5415 clang::FrontendAction::Execute() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:443:0
#24 0x1d7d904 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:807:0
#25 0x1ecb826 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:0
#26 0x1089dcf cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/cc1_main.cpp:110:0
#27 0x10827ec ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:369:0
#28 0x1082da4 main /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:415:0
#29 0x7fcc5a7af76d __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:258:0
#30 0x107f7b9 _start (/home/bhargava/workspace/llvm/bin/clang-3.6+0x107f7b9)
Stack dump:
0.	Program arguments: /home/bhargava/workspace/llvm/bin/clang-3.6 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name exception.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -ffunction-sections -fdata-sections -coverage-file /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan/projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o -nostdinc++ -resource-dir /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0 -dependency-file projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o.d -MT projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D _DEBUG -D _LIBCPP_BUILD_STATIC -I projects/libcxx/lib -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/lib -I include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include -internal-isystem /usr/local/include -internal-isystem /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wall -Werror=return-type -W -Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wno-error -pedantic -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -fsanitize=dataflow -fsanitize-blacklist=/home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/dfsan_abilist.txt -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o -x c++ /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Unnamed pass: implement Pass::getPassName()' on module '/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/exception.cpp'.
clang-3.6: error: unable to execute command: Aborted (core dumped)
clang-3.6: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (http://llvm.org/git/clang.git a20fc96159611e259da333aa52d49aafd32373e7) (http://llvm.org/git/llvm.git 1f229009ed1bac72844587d24d031929175330dd)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg: /tmp/exception-734259.cpp
clang-3.6: note: diagnostic msg: /tmp/exception-734259.sh
clang-3.6: note: diagnostic msg: 

********************
FAILED: /home/bhargava/workspace/llvm/bin/clang++   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fsanitize=dataflow -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -fstrict-aliasing -Iprojects/libcxxabi/src -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/src -Iinclude -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/include -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include    -nostdinc++ -Werror=return-type -W -Wall -Wchar-subscripts -Wconversion -Wmismatched-tags -Wmissing-braces -Wnewline-eof -Wno-unused-function -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings -Wundef -Wno-error -pedantic -D_DEBUG -D_LIBCPP_BUILD_STATIC -fPIC -MMD -MT projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o -MF projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o.d -o projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o -c /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/src/cxa_handlers.cpp
clang-3.6: /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1404: void {anonymous}::DFSanVisitor::visitCallSite(llvm::CallSite): Assertion `!(cast<FunctionType>( CS.getCalledValue()->getType()->getPointerElementType())->isVarArg() && dyn_cast<InvokeInst>(CS.getInstruction()))' failed.
#0 0x1bc11a4 llvm::sys::PrintStackTrace(_IO_FILE*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:423:0
#1 0x1bc143f PrintStackTraceSignalHandler(void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:481:0
#2 0x1bc0100 SignalHandler(int) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:198:0
#3 0x7f9e5409ccb0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x7f9e532d80d5 gsignal /build/buildd/eglibc-2.15/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:64:0
#5 0x7f9e532db83b abort /build/buildd/eglibc-2.15/stdlib/abort.c:93:0
#6 0x7f9e532d0d9e __assert_fail_base /build/buildd/eglibc-2.15/assert/assert.c:55:0
#7 0x7f9e532d0e42 (/lib/x86_64-linux-gnu/libc.so.6+0x2ee42)
#8 0x2408343 (anonymous namespace)::DFSanVisitor::visitCallSite(llvm::CallSite) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1406:0
#9 0x241018e llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvokeInst(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:225:0
#10 0x240dce5 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvoke(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#11 0x240bd07 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#12 0x240a68d llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:114:0
#13 0x2404a35 (anonymous namespace)::DataFlowSanitizer::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:821:0
#14 0x1800e66 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1616:0
#15 0x1801514 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1723:0
#16 0x1801733 llvm::legacy::PassManager::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1757:0
#17 0x214a737 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:636:0
#18 0x214a85f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:657:0
#19 0x212c8e4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:178:0
#20 0x25ef7d2 clang::ParseAST(clang::Sema&, bool, bool) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Parse/ParseAST.cpp:153:0
#21 0x1db595e clang::ASTFrontendAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:539:0
#22 0x212ee1f clang::CodeGenAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:734:0
#23 0x1db5415 clang::FrontendAction::Execute() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:443:0
#24 0x1d7d904 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:807:0
#25 0x1ecb826 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:0
#26 0x1089dcf cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/cc1_main.cpp:110:0
#27 0x10827ec ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:369:0
#28 0x1082da4 main /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:415:0
#29 0x7f9e532c376d __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:258:0
#30 0x107f7b9 _start (/home/bhargava/workspace/llvm/bin/clang-3.6+0x107f7b9)
Stack dump:
0.	Program arguments: /home/bhargava/workspace/llvm/bin/clang-3.6 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name cxa_handlers.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -ffunction-sections -fdata-sections -coverage-file /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan/projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o -nostdinc++ -resource-dir /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0 -dependency-file projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o.d -MT projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D _DEBUG -D _LIBCPP_BUILD_STATIC -I projects/libcxxabi/src -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/src -I include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include -internal-isystem /usr/local/include -internal-isystem /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Werror=return-type -W -Wall -Wchar-subscripts -Wconversion -Wmismatched-tags -Wmissing-braces -Wnewline-eof -Wno-unused-function -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings -Wundef -Wno-error -pedantic -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -fsanitize=dataflow -fsanitize-blacklist=/home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/dfsan_abilist.txt -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_handlers.cpp.o -x c++ /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/src/cxa_handlers.cpp 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Unnamed pass: implement Pass::getPassName()' on module '/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxxabi/src/cxa_handlers.cpp'.
clang-3.6: error: unable to execute command: Aborted (core dumped)
clang-3.6: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (http://llvm.org/git/clang.git a20fc96159611e259da333aa52d49aafd32373e7) (http://llvm.org/git/llvm.git 1f229009ed1bac72844587d24d031929175330dd)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg: /tmp/cxa_handlers-49917b.cpp
clang-3.6: note: diagnostic msg: /tmp/cxa_handlers-49917b.sh
clang-3.6: note: diagnostic msg: 

********************
FAILED: /home/bhargava/workspace/llvm/bin/clang++   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fsanitize=dataflow -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -std=c++11 -Iprojects/libcxx/lib -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/lib -Iinclude -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include    -nostdinc++ -Wall -Werror=return-type -W -Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wno-error -pedantic -D_DEBUG -D_LIBCPP_BUILD_STATIC -fPIC -MMD -MT projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o -MF projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o.d -o projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o -c /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/debug.cpp
clang-3.6: /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1404: void {anonymous}::DFSanVisitor::visitCallSite(llvm::CallSite): Assertion `!(cast<FunctionType>( CS.getCalledValue()->getType()->getPointerElementType())->isVarArg() && dyn_cast<InvokeInst>(CS.getInstruction()))' failed.
#0 0x1bc11a4 llvm::sys::PrintStackTrace(_IO_FILE*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:423:0
#1 0x1bc143f PrintStackTraceSignalHandler(void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:481:0
#2 0x1bc0100 SignalHandler(int) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Support/Unix/Signals.inc:198:0
#3 0x7f5796ed1cb0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x7f579610d0d5 gsignal /build/buildd/eglibc-2.15/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:64:0
#5 0x7f579611083b abort /build/buildd/eglibc-2.15/stdlib/abort.c:93:0
#6 0x7f5796105d9e __assert_fail_base /build/buildd/eglibc-2.15/assert/assert.c:55:0
#7 0x7f5796105e42 (/lib/x86_64-linux-gnu/libc.so.6+0x2ee42)
#8 0x2408343 (anonymous namespace)::DFSanVisitor::visitCallSite(llvm::CallSite) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1406:0
#9 0x241018e llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvokeInst(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:225:0
#10 0x240dce5 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visitInvoke(llvm::InvokeInst&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#11 0x240bd07 llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/Instruction.def:101:0
#12 0x240a68d llvm::InstVisitor<(anonymous namespace)::DFSanVisitor, void>::visit(llvm::Instruction*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include/llvm/IR/InstVisitor.h:114:0
#13 0x2404a35 (anonymous namespace)::DataFlowSanitizer::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:821:0
#14 0x1800e66 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1616:0
#15 0x1801514 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1723:0
#16 0x1801733 llvm::legacy::PassManager::run(llvm::Module&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/lib/IR/LegacyPassManager.cpp:1757:0
#17 0x214a737 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:636:0
#18 0x214a85f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:657:0
#19 0x212c8e4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:178:0
#20 0x25ef7d2 clang::ParseAST(clang::Sema&, bool, bool) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Parse/ParseAST.cpp:153:0
#21 0x1db595e clang::ASTFrontendAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:539:0
#22 0x212ee1f clang::CodeGenAction::ExecuteAction() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:734:0
#23 0x1db5415 clang::FrontendAction::Execute() /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:443:0
#24 0x1d7d904 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:807:0
#25 0x1ecb826 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:0
#26 0x1089dcf cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/cc1_main.cpp:110:0
#27 0x10827ec ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:369:0
#28 0x1082da4 main /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/tools/clang/tools/driver/driver.cpp:415:0
#29 0x7f57960f876d __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:258:0
#30 0x107f7b9 _start (/home/bhargava/workspace/llvm/bin/clang-3.6+0x107f7b9)
Stack dump:
0.	Program arguments: /home/bhargava/workspace/llvm/bin/clang-3.6 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name debug.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -ffunction-sections -fdata-sections -coverage-file /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan/projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o -nostdinc++ -resource-dir /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0 -dependency-file projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o.d -MT projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D _DEBUG -D _LIBCPP_BUILD_STATIC -I projects/libcxx/lib -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/lib -I include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/include -I /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/include -internal-isystem /usr/local/include -internal-isystem /home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wall -Werror=return-type -W -Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wno-error -pedantic -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/bhargava/work/clang-analyzer/libc++/build-libcxx-libcxxabi-dfsan -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -fsanitize=dataflow -fsanitize-blacklist=/home/bhargava/workspace/llvm/bin/../lib/clang/3.7.0/dfsan_abilist.txt -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o -x c++ /home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/debug.cpp 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Unnamed pass: implement Pass::getPassName()' on module '/home/bhargava/work/clang-analyzer/git-mirror-test/llvm/projects/libcxx/src/debug.cpp'.
clang-3.6: error: unable to execute command: Aborted (core dumped)
clang-3.6: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (http://llvm.org/git/clang.git a20fc96159611e259da333aa52d49aafd32373e7) (http://llvm.org/git/llvm.git 1f229009ed1bac72844587d24d031929175330dd)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg: /tmp/debug-9a87ed.cpp
clang-3.6: note: diagnostic msg: /tmp/debug-9a87ed.sh
clang-3.6: note: diagnostic msg: 

********************
ninja: build stopped: subcommand failed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150223/f424c184/attachment.sig>


More information about the cfe-dev mailing list