From 65ccd641bacea33be23d51da737c2de7543d0f5e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 20 Dec 2021 08:41:55 -0300 Subject: debug: Remove catchsegv and libSegfault (BZ #14913) Trapping SIGSEGV within the process is error-prone, adds security issues, and modern analysis design tends to happen out of the process (either by attaching a debugger or by post-mortem analysis). The libSegfault also has some design problems, it uses non async-signal-safe function (backtrace) on signal handler. There are multiple alternatives if users do want to use similar functionality, such as sigsegv gnulib module or libsegfault. --- debug/Makefile | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'debug/Makefile') diff --git a/debug/Makefile b/debug/Makefile index 9c2ce61a86..5818d751c9 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -167,12 +167,9 @@ tests-unsupported = tst-chk4 tst-chk5 tst-chk6 tst-chk8 \ tst-lfschk4 tst-lfschk5 tst-lfschk6 endif -extra-libs = libSegFault libpcprofile +extra-libs = libpcprofile extra-libs-others = $(extra-libs) -libSegFault-routines = segfault -libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes)) - libpcprofile-routines = pcprofile libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes)) @@ -180,10 +177,7 @@ others = pcprofiledump install-bin = pcprofiledump install-bin-script = xtrace -ifeq ($(build-shared),yes) -install-bin-script += catchsegv -endif -generated += catchsegv xtrace +generated += xtrace include ../Rules @@ -209,15 +203,6 @@ endif sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') -$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \ - $(common-objpfx)config.make - slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \ - sed -e 's|@VERSION@|$(version)|' -e "s|@SLIB@|$$slibpfx|" \ - -e 's|@PKGVERSION@|$(PKGVERSION)|' \ - -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $< > $@.new - chmod 555 $@.new - mv -f $@.new $@ - $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o $(objpfx)xtrace: xtrace.sh -- cgit 1.4.1