correctcomputation / checkedc-clang

This is the primary development repository for 3C, a tool for automatically converting legacy C code to the Checked C extension of C, which aims to enforce spatial memory safety. This repository is a fork of Checked C's.
14 stars 5 forks source link

CConvertStandalone core dumps on `vsftpd` #56

Closed Isweet closed 4 years ago

Isweet commented 4 years ago
ins@work:~/Projects/checkedc-eval-vsftpd$ ./convert_all.sh 
CConvertStandalone: /home/ins/Projects/checkedc-clang/clang-tools-extra/clangd/cconvert/ProgramInfo.cpp:1030: std::set<ConstraintVariable *> ProgramInfo::getVariable(clang::Decl *, clang::ASTContext *, clang::FunctionDecl *, int): Assertion `I != Variables.end()' failed.
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2316bc9]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2316d79]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2314e26]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x231741b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f1348b0a890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f13477d0e97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f13477d2801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f13477c239a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f13477c2412]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x5c4838]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x5c4c07]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6bcbc4]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6bc4e1]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6be1ff]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6b51f5]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6cc90f]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6b208f]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6ad9d6]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6ad5bf]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6ad005]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x65bce2]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x655ab3]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x6548ed]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x432053d]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x28f1adc]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x28f1510]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x29556ee]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2b48552]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2b483f3]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2b46b9a]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x2b499c9]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x4f86ad]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f13477b3b97]
/home/ins/Projects/checkedc-clang/llvm/cmake-build-debug/bin/CConvertStandalone[0x4f6dea]
./convert_all.sh: line 51: 25901 Aborted                 (core dumped) CPATH=$INCLUDES $CCONV -output-postfix=checked -extra-arg-before=-D_FORTIFY_SOURCE=2 -extra-arg-before=-w -base-dir="$BASEDIR" $BASEDIR/ftpdataio.c $BASEDIR/ascii.c $BASEDIR/str.c $BASEDIR/seccompsandbox.c $BASEDIR/utility.c $BASEDIR/twoprocess.c $BASEDIR/ftpcmdio.c $BASEDIR/filestr.c $BASEDIR/postprivparent.c $BASEDIR/access.c $BASEDIR/netstr.c $BASEDIR/strlist.c $BASEDIR/ptracesandbox.c $BASEDIR/privsock.c $BASEDIR/ssl.c $BASEDIR/sysutil.c $BASEDIR/prelogin.c $BASEDIR/opts.c $BASEDIR/logging.c $BASEDIR/readwrite.c $BASEDIR/banner.c $BASEDIR/hash.c $BASEDIR/privops.c $BASEDIR/ls.c $BASEDIR/tunables.c $BASEDIR/postlogin.c $BASEDIR/secutil.c $BASEDIR/secbuf.c $BASEDIR/sslslave.c $BASEDIR/ipaddrparse.c $BASEDIR/oneprocess.c $BASEDIR/features.c $BASEDIR/standalone.c $BASEDIR/sysstr.c $BASEDIR/ftppolicy.c $BASEDIR/main.c $BASEDIR/parseconf.c $BASEDIR/sysdeputil.c $BASEDIR/tcpwrap.c
Machiry commented 4 years ago

I am looking into this. This could be because of the latest push I did for handling function pointers.

Isweet commented 4 years ago

Still core dumps on my machine, but with a different assertion error this time:

CConvertStandalone: /home/ins/Projects/checkedc-clang/clang-tools-extra/clangd/cconvert/RewriteUtils.cpp:569: bool TypeRewritingVisitor::VisitFunctionDecl(clang::FunctionDecl *): Assertion `cDefn != nullptr' failed.
mwhicks1 commented 4 years ago

Fixed somewhere along the line ...