From fe5f3411a4246019a4be2992080eda24ce7c4909 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 28 Aug 2022 11:37:37 +0200 Subject: [PATCH] Turn off gcc's tree-slp-vectorize option sadf crashes in non regression test nr. 00610 with a segmentation fault: $ sadf -c tests/data-10.3.1 >/dev/null file_magic: OK HZ: Using current value: 100 file_header: OK file_activity: A_CPU A_PCSW A_IRQ A_SWAP A_PAGE A_IO A_MEMORY A_HUGE A_KTABLES A_QUEUE A_DISK A_NET_DEV A_NET_EDEV A_NET_NFS A_NET_NFSD A_NET_SOCK A_NET_IP A_NET_EIP A_NET_ICMP A_NET_EICMP A_NET_TCP A_NET_ETCP A_NET_UDP A_NET_SOCK6 A_NET_IP6 A_NET_EIP6 A_NET_ICMP6 A_NET_EICMP6 A_NET_UDP6 A_PWR_CPU A_PWR_FAN A_PWR_TEMP A_PWR_USB A_FS OK Statistics: HRHCHnuunu...uuuunununu...uu......uu...n.n.n.n.Segmentation fault (core dumped) It turns out that the problem is due to gcc optimizations made with option -O2. Unsetting tree-slp-vectorize flag fixes that problem. Signed-off-by: Sebastien GODARD --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index a539cda..ab6f541 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,7 +97,7 @@ endif ifndef CFLAGS CFLAGS = @CFLAGS@ endif -CFLAGS += -Wall -Wstrict-prototypes -pipe -O2 +CFLAGS += -Wall -Wstrict-prototypes -pipe -O2 -fno-tree-slp-vectorize ifndef DFLAGS DFLAGS = @DFLAGS@ -- 2.50.1