Skip to content

Commit

Permalink
Travis CI updates (#709)
Browse files Browse the repository at this point in the history
* Use clang-10 for scan-build

* Enable sanitize option for debug build

* Disable some errors and error limit

* Fix reorder-init-list warnings
  • Loading branch information
tklengyel authored Oct 5, 2019
1 parent 0fd85fb commit 8da7bcf
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ matrix:
install:
- ./autogen.sh
script:
- ./configure --enable-debug || cat config.log
- ./configure --enable-debug --enable-sanitize || cat config.log
- make

- env:
Expand Down Expand Up @@ -184,29 +184,42 @@ matrix:
# clang scan-build
#
- env:
- TEST="scan-build"
- TEST="scan-build" CXX_COMPILER=clang++-10 CXX_STDLIB=g++-9
addons:
apt:
packages:
- clang-10
- clang-tools-10
- g++-9
- bison
- flex
- libjson-c-dev
- autoconf-archive
- libxen-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
before_install:
- sudo apt-get update
- sudo apt-get -q -y install bison flex libjson-c-dev autoconf-archive libxen-dev
- export INSTALLDIR=$PWD/usr/local/
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/usr/local/lib
- export C_INCLUDE_PATH=$PWD/usr/local/include
- export CPLUS_INCLUDE_PATH=$PWD/usr/local/include
- export PKG_CONFIG_PATH="$PWD/usr/local/lib/pkgconfig/"
- export LDFLAGS="-L$PWD/usr/local/lib"
- export CFLAGS="-I$PWD/usr/local/include"
install:
- git submodule update --init libvmi
- cd libvmi
- autoreconf -vif
- ./configure --prefix=${INSTALLDIR} --disable-kvm --disable-file --disable-bareflank --disable-safety-checks
- make
- make install
- cd ..
install:
- ./autogen.sh
script:
- scan-build --status-bugs --use-cc=clang --use-c++=clang++ -analyze-headers -disable-checker deadcode.DeadStores ./configure --enable-debug
- scan-build --status-bugs --use-cc=clang --use-c++=clang++ -analyze-headers -disable-checker deadcode.DeadStores make
- scan-build-10 --status-bugs --use-cc=clang-10 --use-c++=clang++-10 -analyze-headers -disable-checker deadcode.DeadStores ./configure --enable-debug
- scan-build-10 --status-bugs --use-cc=clang-10 --use-c++=clang++-10 -analyze-headers -disable-checker deadcode.DeadStores make

#
# SonarCloud
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if DEBUG
AM_CFLAGS += -DDRAKVUF_DEBUG -Werror -Wall -Wextra -g -ggdb3
AM_CFLAGS += -Wno-missing-field-initializers
AM_CXXFLAGS += -DDRAKVUF_DEBUG -Werror -Wall -Wextra -g -ggdb3
AM_CXXFLAGS += -Wno-missing-field-initializers
AM_CXXFLAGS += -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-c99-designator -ferror-limit=0
if !HARDENING
AM_CFLAGS += -pg
AM_CXXFLAGS += -pg
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ endif
if DEBUG
AM_CXXFLAGS += -DDRAKVUF_DEBUG -Werror -Wall -Wextra -g -ggdb3
AM_CXXFLAGS += -Wno-missing-field-initializers -Wno-unused-parameter
AM_CXXFLAGS += -Wno-initializer-overrides
AM_CXXFLAGS += -Wno-initializer-overrides -Wno-unknown-warning-option
AM_CXXFLAGS += -Wno-c99-designator -ferror-limit=0 -Wno-reorder-init-list
AM_CXXFLAGS += -Wcast-qual -Wcast-align -Wstrict-aliasing \
-Wpointer-arith -Winit-self -Wshadow \
-Wredundant-decls -Wfloat-equal -Wundef \
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/syscalls/commonscproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ typedef struct
{
const char* name;
arg_direction_t dir;
type_t type;
const char* dir_opt;
type_t type;
} arg_t;

typedef struct
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/syscalls/syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ static int linux_build_argbuf(void* buf, vmi_instance_t vmi, drakvuf_trap_info_t
access_context_t ctx =
{
.translate_mechanism = VMI_TM_PROCESS_DTB,
.dtb = info->regs->cr3,
.addr = info->regs->rdi,
.dtb = info->regs->cr3
};

rc = vmi_read(vmi, &ctx, sizeof(lr), &lr, NULL);
Expand Down

0 comments on commit 8da7bcf

Please sign in to comment.