]> granicus.if.org Git - sysstat/commitdiff
Turn off gcc's tree-slp-vectorize option
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 28 Aug 2022 09:37:37 +0000 (11:37 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 28 Aug 2022 09:37:37 +0000 (11:37 +0200)
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 <sysstat@users.noreply.github.com>
Makefile.in

index a539cda184d62721b619ced6e52e8ff3ece7666d..ab6f5412cddf5657ef00a5627e44ef2a3d6874df 100644 (file)
@@ -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@