diff options
author | Richard Weickelt <richard@weickelt.de> | 2019-05-25 17:45:41 +0200 |
---|---|---|
committer | Richard Weickelt <richard@weickelt.de> | 2019-06-07 21:29:06 +0000 |
commit | cba28b26cdf93a74b52e1ec1635bee7107cb4995 (patch) | |
tree | 812b74d1db9f7a0d69ca134006794cca5493d2a9 /scripts | |
parent | 7d3c57f18250af0599b5af799dab14f172f19312 (diff) |
Make the address sanitizer work in Docker
- Libasan requires ptrace capabilities when running in Docker
- Provide a suppressions file
- Update stretch Docker image to build against libicu and match
the configure options of the official Qt release. Otherwise
the address sanitizer fails when Qbs loads plugins.
Change-Id: Ib620187a3cdd486eaf646ee0bd022b811744a998
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/address-sanitizer-suppressions.txt | 1 | ||||
-rwxr-xr-x | scripts/build-qbs-with-qbs.sh | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/address-sanitizer-suppressions.txt b/scripts/address-sanitizer-suppressions.txt new file mode 100644 index 000000000..9381cc58e --- /dev/null +++ b/scripts/address-sanitizer-suppressions.txt @@ -0,0 +1 @@ +leak:libQt5Script.so.5 diff --git a/scripts/build-qbs-with-qbs.sh b/scripts/build-qbs-with-qbs.sh index ff747622c..0808cbbef 100755 --- a/scripts/build-qbs-with-qbs.sh +++ b/scripts/build-qbs-with-qbs.sh @@ -46,6 +46,12 @@ set -e export QBS_AUTOTEST_SETTINGS_DIR="${QBS_AUTOTEST_SETTINGS_DIR:-/tmp/qbs-settings}" # +# Qbs is built with the address sanitizer enabled. +# Suppress findings in some parts of Qbs / dependencies. +# +export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" + +# # Additional build options # BUILD_OPTIONS="\ @@ -69,6 +75,7 @@ qbs build -p "qbs documentation" ${BUILD_OPTIONS} if [ -z "${QBS_AUTOTEST_PROFILE}" ]; then export QBS_AUTOTEST_PROFILE=autotestprofile + RUN_OPTIONS="\ --settings-dir ${QBS_AUTOTEST_SETTINGS_DIR} \ " |