1

In the README file of https://github.com/mull-project/mull, I was trying their mutatation testing examples on openssl and fmtlib. But, when I enter the mutation test command: mull-cxx -test-framework=GoogleTest -mutators=math_add_mutator ./bin/core-test, I get the following error

parseBitcodeFile failed: Invalid record
mull-cxx: /opt/mull/tools/driver-cxx/driver-cxx.cpp:63: void LoadModuleFromBitcodeTask::operator()(LoadModuleFromBitcodeTask::iterator, LoadModuleFromBitcodeTask::iterator, LoadModuleFromBitcodeTask::Out &, mull::progress_counter &): Assertion `module && "Could not load module"' failed.
Aborted (core dumped)

UPDATE...........

I no longer get the above error. But a new one :( Previously, I was using debian mull not ubuntu. I have written by docker setup below. Now, when I try to perform mutation testing, I get problems with linking:

Extracting bitcode from executable (threads: 1): 1/1. Finished in 0ms.
Loading bitcode files (threads: 2): 2/2. Finished in 11ms.
Could not find dynamic library: libpthread.so.0
Could not find dynamic library: libstdc++.so.6
Could not find dynamic library: libm.so.6
Could not find dynamic library: libgcc_s.so.1
Could not find dynamic library: libc.so.6

My mull setup is in docker. I have done the following to setup my image:

FROM ubuntu:18.04

RUN mkdir -p /tmp/home
ENV HOME /tmp/home

RUN apt-get update && apt-get upgrade -y \
    && apt-get install -y git build-essential software-properties-common\
    && apt-get install -y vim wget

RUN apt-get update

RUN apt-get install -y python3-pip \
    && pip3 install conan

RUN apt-get update

## cpp unit
# RUN apt-get install -y autotools-dev automake libtool
RUN apt-get install -y libcppunit-dev  

# for mull
RUN apt-get install -y sqlite3 libsqlite3-dev libncurses5-dev libxml2-dev uuid-dev libstdc++-6-dev

After i run the container, I setup prebuilt llvm binaries. LLVM location is in /usr/src/llvm

# LLVM setup
export PATH="$PATH:/usr/src/llvm/bin"
cat > llvm.conf << "HEREDOC"
/usr/src/llvm/lib
HEREDOC

mv llvm.conf /etc/ld.so.conf.d/
ldconfig

export CC=/usr/src/llvm/bin/clang  
export CXX=/usr/src/llvm/bin/clang++

apt-get install -y cmake
apt-get update

dpkg -i setup/libicu55_55.1-7_amd64.deb
dpkg -i setup/Mull-0.3.0-LLVM-8.0-ubuntu-16.04.deb
Community
  • 1
  • 1
Ankit Koirala
  • 354
  • 3
  • 13
  • It is very likely that you use 'old' Clang/LLVM that produces bitcode incompatible with the Clang/LLVM used by Mull. Which version of Mull and clang do you use? Also, which OS is it? – AlexDenisov Jun 12 '19 at 17:56
  • @AlexDenisov Thanks for the reply. After managing the versions, I am getting new errors. I have updated my question. Could you take a look? – Ankit Koirala Jun 12 '19 at 21:22
  • @AnkitKoirala, I am speaking here as a co-developer of Mull. It looks like you are getting started with Mull using some custom setup. Please open your ticket on https://github.com/mull-project/mull/issues and we will help you there. The multistep "how-to tutorial" questions are not welcome by the moderators here on SO. – Stanislav Pankevich Jun 12 '19 at 21:28

0 Answers0