Fixed build with HWASan sandbox/akazmin/hwasan_build
authorAndrey Kazmin <a.kazmin@partner.samsung.com>
Tue, 23 Mar 2021 10:33:26 +0000 (13:33 +0300)
committerAndrey Kazmin <a.kazmin@partner.samsung.com>
Tue, 23 Mar 2021 10:33:26 +0000 (13:33 +0300)
Autogen setups its default handler for SIGTRAP
which is used by HWASan internally.
Disable default handler for SIGTRAP.

Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
agen5/autogen.c

index 3fd1a0c..b294b3b 100644 (file)
@@ -575,7 +575,8 @@ setup_signals(sighandler_proc_t * hdl_chld,
         default:
             sa.sa_handler = hdl_dflt;
         }
-        sigaction(sigNo,  &sa, NULL);
+        if (sigNo != SIGTRAP)
+            sigaction(sigNo,  &sa, NULL);
     } while (++sigNo < maxSig);
 }