diff options
-rw-r--r-- | packaging/rpm.spec | 4 | ||||
-rw-r--r-- | rpmio/rpmsq.c | 3 |
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) { |