From 4da5081242ff63ccb97ff0fa568c3b11a563901b Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 26 Mar 2024 10:15:05 +0000 Subject: [PATCH] Add ASAN test --- .github/workflows/mosquitto-make-asan.yml | 48 +++++++++++++++++++++++ config.mk | 4 +- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/mosquitto-make-asan.yml diff --git a/.github/workflows/mosquitto-make-asan.yml b/.github/workflows/mosquitto-make-asan.yml new file mode 100644 index 0000000000..1ed6acfa83 --- /dev/null +++ b/.github/workflows/mosquitto-make-asan.yml @@ -0,0 +1,48 @@ +name: Mosquitto - Make ASAN + +on: + push: + branches: + - develop + - fixes + pull_request: + branches: + - develop + - fixes + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: Install third party dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + clang \ + docbook-xsl \ + lcov \ + libargon2-dev \ + libc-ares-dev \ + libcjson-dev \ + libcjson1 \ + libcunit1-dev \ + libssl-dev \ + libwrap0-dev \ + microsocks \ + python3-all \ + python3-paho-mqtt \ + python3-psutil \ + uthash-dev \ + xsltproc + - + uses: actions/checkout@v4 + with: + submodules: 'true' + - + name: make + run: make WITH_ASAN=yes + - + name: make test + run: | + make WITH_ASAN=yes ptest diff --git a/config.mk b/config.mk index 78e6e334b8..8a711923c8 100644 --- a/config.mk +++ b/config.mk @@ -232,8 +232,8 @@ endif ifeq ($(WITH_ASAN),yes) CC:=clang - CFLAGS+=-fsanitize=address - LDFLAGS+=-fsanitize=address + LOCAL_CFLAGS+=-fsanitize=address + LOCAL_LDFLAGS+=-fsanitize=address endif ifeq ($(WITH_LTO),yes)