From 4cfe8bb15bf7ca70110a5add51fac078ca62afcc Mon Sep 17 00:00:00 2001 From: Cedric Koch-Hofer Date: Fri, 31 May 2024 12:41:01 +0000 Subject: [PATCH] DAOS-15799 build: Add libsanitize Add libsanitize for debugging stack smashing occuring on LRZ servers. Skip-test: true Required-githooks: true Signed-off-by: Cedric Koch-Hofer --- site_scons/site_tools/compiler_setup.py | 3 +++ utils/rpms/daos.spec | 8 +++++++- utils/scripts/install-el8.sh | 1 + utils/scripts/install-el9.sh | 1 + utils/scripts/install-leap15.sh | 1 + utils/scripts/install-ubuntu.sh | 1 + 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/site_scons/site_tools/compiler_setup.py b/site_scons/site_tools/compiler_setup.py index 584eb4e997f3..f6519526f016 100644 --- a/site_scons/site_tools/compiler_setup.py +++ b/site_scons/site_tools/compiler_setup.py @@ -18,6 +18,9 @@ # Compiler flags for stack hardening DESIRED_FLAGS.extend(['-fstack-protector-strong', '-fstack-clash-protection']) +# Compiler flags for fast memory error detector +DESIRED_FLAGS.extend(['-fsanitize=address']) + PP_ONLY_FLAGS = ['-Wno-parentheses-equality', '-Wno-builtin-requires-header', '-Wno-unused-function'] diff --git a/utils/rpms/daos.spec b/utils/rpms/daos.spec index def0d1acea1d..9f8816ef7a59 100644 --- a/utils/rpms/daos.spec +++ b/utils/rpms/daos.spec @@ -15,7 +15,7 @@ Name: daos Version: 2.4.2 -Release: 4%{?relval}%{?dist} +Release: 5%{?relval}%{?dist} Summary: DAOS Storage Engine License: BSD-2-Clause-Patent @@ -114,6 +114,9 @@ BuildRequires: libuct-devel BuildRequires: ucx-devel %endif +# Needed for support tasks +BuildRequires: libasan + Requires: openssl # This should only be temporary until we can get a stable upstream release # of mercury, at which time the autoprov shared library version should @@ -555,6 +558,9 @@ getent passwd daos_agent >/dev/null || useradd -s /sbin/nologin -r -g daos_agent # No files in a shim package %changelog +* Fri May 31 2024 Cedric Koch-Hofer 2.4.2-5 +- Support release candidate for 2.4.2 + * Mon Mar 04 2024 Phillip Henderson 2.4.2-4 - Third release candidate for 2.4.2 diff --git a/utils/scripts/install-el8.sh b/utils/scripts/install-el8.sh index e9aa8181c873..b15f32d8cb71 100755 --- a/utils/scripts/install-el8.sh +++ b/utils/scripts/install-el8.sh @@ -37,6 +37,7 @@ dnf --nodocs install \ java-1.8.0-openjdk \ json-c-devel \ libaio-devel \ + lbasan \ libcmocka-devel \ libevent-devel \ libiscsi-devel \ diff --git a/utils/scripts/install-el9.sh b/utils/scripts/install-el9.sh index 6e9e83ed8e41..f5c881c7ec1e 100755 --- a/utils/scripts/install-el9.sh +++ b/utils/scripts/install-el9.sh @@ -36,6 +36,7 @@ dnf --nodocs install \ java-1.8.0-openjdk \ json-c-devel \ libaio-devel \ + libasan \ libcmocka-devel \ libevent-devel \ libipmctl-devel \ diff --git a/utils/scripts/install-leap15.sh b/utils/scripts/install-leap15.sh index 7b223b1ece2c..c22c4366ad46 100755 --- a/utils/scripts/install-leap15.sh +++ b/utils/scripts/install-leap15.sh @@ -31,6 +31,7 @@ dnf --nodocs install \ hwloc-devel \ java-1_8_0-openjdk-devel \ libaio-devel \ + libasan \ libcmocka-devel \ libcapstone-devel \ libevent-devel \ diff --git a/utils/scripts/install-ubuntu.sh b/utils/scripts/install-ubuntu.sh index 45f4bee522be..b75264910f64 100755 --- a/utils/scripts/install-ubuntu.sh +++ b/utils/scripts/install-ubuntu.sh @@ -26,6 +26,7 @@ apt-get install \ golang-go \ kmod \ libaio-dev \ + libasan8 \ libboost-dev \ libcapstone-dev \ libcmocka-dev \