summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kazmin <a.kazmin@partner.samsung.com>2021-07-08 13:59:25 +0300
committerAndrey Kazmin <a.kazmin@partner.samsung.com>2021-12-09 11:57:53 +0300
commit5746c1980a7000e123edd6837284dd5af3a12c9a (patch)
tree0822fcc734f42cd8de68e95cf39db5518fe93411
parentcf9a47e760c4258bc3e70289e59afc5bfe851ca4 (diff)
downloadrpm-5746c1980a7000e123edd6837284dd5af3a12c9a.tar.gz
rpm-5746c1980a7000e123edd6837284dd5af3a12c9a.tar.bz2
rpm-5746c1980a7000e123edd6837284dd5af3a12c9a.zip
HWASan uses SIGTRAP to report an error. Do not block it. Change-Id: I5c89ae4930a3cb2edddbc3034d430356557cddba Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
-rw-r--r--packaging/rpm.spec4
-rw-r--r--rpmio/rpmsq.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index 9bb1322fe..8a4b3c71d 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -155,6 +155,10 @@ export LDFLAGS="${LDFLAGS} -pie -Wl,-Bsymbolic-functions -ffunction-sections"
export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
%endif
+%{?hwasan_build:
+export CPPFLAGS="$CPPFLAGS -DHWASAN_BUILD"
+}
+
%reconfigure \
--disable-dependency-tracking \
--with-lua \
diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
index d157514e9..1bbdd0a6d 100644
--- a/rpmio/rpmsq.c
+++ b/rpmio/rpmsq.c
@@ -186,6 +186,9 @@ int rpmsqBlock(int op)
sigdelset(&newMask, SIGILL);
sigdelset(&newMask, SIGSEGV);
sigdelset(&newMask, SIGTSTP);
+#ifdef HWASAN_BUILD
+ sigdelset(&newMask, SIGTRAP);
+#endif
ret = pthread_sigmask(SIG_BLOCK, &newMask, &oldMask);
}
} else if (op == SIG_UNBLOCK) {