Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
2e11e38f
Unverified
Commit
2e11e38f
authored
Dec 23, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis: enable -fsanitize=undefined
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
619670be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
16 deletions
+34
-16
.travis.yml
.travis.yml
+1
-16
configure.ac
configure.ac
+6
-0
Makefile.am
src/lxc/Makefile.am
+5
-0
travis.sh
src/tests/travis.sh
+22
-0
No files found.
.travis.yml
View file @
2e11e38f
...
@@ -6,22 +6,7 @@ before_install:
...
@@ -6,22 +6,7 @@ before_install:
-
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
-
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
-
sudo apt-get update -qq
-
sudo apt-get update -qq
-
sudo apt-get install -qq coccinelle parallel libapparmor-dev libcap-dev libseccomp-dev python3-dev python3-setuptools docbook2x libgnutls-dev libselinux1-dev linux-libc-dev
-
sudo apt-get install -qq coccinelle parallel libapparmor-dev libcap-dev libseccomp-dev python3-dev python3-setuptools docbook2x libgnutls-dev libselinux1-dev linux-libc-dev
script
:
script
:
src/tests/travis.sh
-
./coccinelle/run-coccinelle.sh -i
-
git diff --exit-code
-
export CFLAGS="-Wall -Werror"
-
export LDFLAGS="-pthread -lpthread"
-
./autogen.sh
-
rm -Rf build
-
mkdir build
-
cd build
-
../configure --enable-tests --with-distro=unknown
-
make -j4
-
make DESTDIR=$TRAVIS_BUILD_DIR/install install
-
cd ../config/apparmor
-
./lxc-generate-aa-rules.py container-rules.base > /tmp/output
-
diff /tmp/output container-rules
notifications
:
notifications
:
email
:
email
:
recipients
:
recipients
:
...
...
configure.ac
View file @
2e11e38f
...
@@ -438,6 +438,12 @@ AC_ARG_ENABLE([asan],
...
@@ -438,6 +438,12 @@ AC_ARG_ENABLE([asan],
[enable_asan=$enableval], [enable_asan=no])
[enable_asan=$enableval], [enable_asan=no])
AM_CONDITIONAL([ENABLE_ASAN], [test "x$enable_asan" = "xyes"])
AM_CONDITIONAL([ENABLE_ASAN], [test "x$enable_asan" = "xyes"])
# Build with UBSAN commands
AC_ARG_ENABLE([ubsan],
[AS_HELP_STRING([--enable-ubsan], [build with ubsan sanitizer enabled [default=no]])],
[enable_asan=$enableval], [enable_ubsan=no])
AM_CONDITIONAL([ENABLE_UBSAN], [test "x$enable_ubsan" = "xyes"])
# Optional test binaries
# Optional test binaries
AC_ARG_ENABLE([tests],
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
[AS_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
...
...
src/lxc/Makefile.am
View file @
2e11e38f
...
@@ -232,12 +232,17 @@ endif
...
@@ -232,12 +232,17 @@ endif
liblxc_la_CFLAGS
=
-fPIC
\
liblxc_la_CFLAGS
=
-fPIC
\
-DPIC
\
-DPIC
\
$(AM_CFLAGS)
\
$(AM_CFLAGS)
\
$(LIBLXC_SANITIZER)
\
-pthread
-pthread
if
ENABLE_ASAN
if
ENABLE_ASAN
liblxc_la_CFLAGS
+=
-fsanitize
=
address
\
liblxc_la_CFLAGS
+=
-fsanitize
=
address
\
-fno-omit-frame-pointer
-fno-omit-frame-pointer
endif
endif
if
ENABLE_UBSAN
liblxc_la_CFLAGS
+=
-fsanitize
=
undefined
endif
liblxc_la_LDFLAGS
=
-pthread
\
liblxc_la_LDFLAGS
=
-pthread
\
-Wl
,-no-undefined
\
-Wl
,-no-undefined
\
-Wl
,-soname,liblxc.so.
$
(
firstword
$
(
subst ., ,@LXC_ABI@
))
\
-Wl
,-soname,liblxc.so.
$
(
firstword
$
(
subst ., ,@LXC_ABI@
))
\
...
...
src/tests/travis.sh
0 → 100755
View file @
2e11e38f
#! /bin/bash
set
-e
./coccinelle/run-coccinelle.sh
-i
git diff
--exit-code
export
CFLAGS
=
"-Wall -Werror"
export
LDFLAGS
=
"-pthread -lpthread"
./autogen.sh
rm
-Rf
build
mkdir
build
cd
build
if
[
"
$CC_FOR_BUILD
"
==
"gcc"
]
;
then
../configure
--enable-tests
--enable-ubsan
--with-distro
=
unknown
else
../configure
--enable-tests
--with-distro
=
unknown
fi
make
-j4
make
DESTDIR
=
"
$TRAVIS_BUILD_DIR
"
/install
install
cd
../config/apparmor
./lxc-generate-aa-rules.py container-rules.base
>
/tmp/output
diff /tmp/output container-rules
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment