Merge #14794: tests: Add AddressSanitizer (ASan) Travis build

6541d59ddc Add LSan suppression warnings (practicalswift)
ff7212ec32 Add ASan Travis build (practicalswift)
ebd3bf2590 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
This commit is contained in:
MarcoFalke 2018-11-27 16:30:32 -05:00 committed by munkybooty
parent 3dbc611e55
commit 22ae9fde91
3 changed files with 17 additions and 4 deletions

View File

@ -249,7 +249,7 @@ after_success:
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]' name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
env: >- env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh" FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh"
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
- stage: test - stage: test
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]' name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
env: >- env: >-
@ -259,7 +259,7 @@ after_success:
name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]' name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
env: >- env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh" FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh"
# x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer)
- stage: test - stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]' name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
env: >- env: >-
@ -269,7 +269,6 @@ after_success:
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]' name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
env: >- env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh" FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh"
- stage: test - stage: test
env: >- env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh" FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh"

View File

@ -4,6 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid network messages.""" """Test node responses to invalid network messages."""
import asyncio import asyncio
import os
import struct import struct
import sys import sys
@ -65,7 +66,10 @@ class InvalidMessagesTest(BitcoinTestFramework):
msg_at_size = msg_unrecognized(str_data="b" * valid_data_limit) msg_at_size = msg_unrecognized(str_data="b" * valid_data_limit)
assert len(msg_at_size.serialize()) == msg_limit assert len(msg_at_size.serialize()) == msg_limit
with node.assert_memory_usage_stable(increase_allowed=0.5): increase_allowed = 0.5
if [s for s in os.environ.get("BITCOIN_CONFIG", "").split(" ") if "--with-sanitizers" in s and "address" in s]:
increase_allowed = 3.5
with node.assert_memory_usage_stable(increase_allowed=increase_allowed):
self.log.info( self.log.info(
"Sending a bunch of large, junk messages to test " "Sending a bunch of large, junk messages to test "
"memory exhaustion. May take a bit...") "memory exhaustion. May take a bit...")

View File

@ -0,0 +1,10 @@
# Suppress warnings about addCoin(...) leak in the CoinSelection benchmark
leak:addCoin
leak:bench_dash
# Suppress warnings triggered in dependencies
leak:libcrypto
leak:libqminimal
leak:libQt5Core
leak:libQt5Gui
leak:libQt5Widgets