linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Segmentation fault when running sparse with current linux master
@ 2020-09-17 11:08 Christian Eggers
  2020-09-17 14:20 ` Luc Van Oostenryck
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Eggers @ 2020-09-17 11:08 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christian Eggers

Build of the current linux kernel breaks on my system due to segmentation fault when running sparse.

Sparse version: 0.6.2 (built by openSUSE build service)

Command line:
sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -D__ARMEL__ -D__arm__ --arch=arm -mlittle-endian -m32 -Wp,-MMD,kernel/time/.timekeeping.o.d -nostdinc -isystem /opt/orbiter-tiny/3.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include -I/home/eggers/Projekte/jupiter/linux/linux-stable-rt/arch/arm/include -I./arch/arm/include/generated -I/home/eggers/Projekte/jupiter/linux/linux-stable-rt/include -I./include -I/home/eggers/Projekte/jupiter/linux/linux-stable-rt/arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I/home/eggers/Projekte/jupiter/linux/linux-stable-rt/include/uapi -I./include/generated/uapi -include /home/eggers/Projekte/jupiter/linux/linux-stable-rt/include/linux/kconfig.h -include /home/eggers/Projekte/jupiter/linux/linux-stable-rt/include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-t
 rigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -g -gdwarf-4 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-po
 inter-types -Werror=designated-init -fmacro-prefix-map=/home/eggers/Projekte/jupiter/linux/linux-stable-rt/= -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits --sysroot=/opt/orbiter-tiny/3.1.1/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi -W -I /home/eggers/Projekte/jupiter/linux/linux-stable-rt/kernel/time -I ./kernel/time -DKBUILD_MODFILE='"kernel/time/timekeeping"' -DKBUILD_BASENAME='"timekeeping"' -DKBUILD_MODNAME='"timekeeping"' /home/eggers/Projekte/jupiter/linux/linux-stable-rt/kernel/time/timekeeping.c

(gdb) backtrace 
#0  sset_test (idx=110, s=0x55a4fb42e440) at sset.h:43
#1  sset_testset (idx=110, s=0x55a4fb42e440) at sset.h:50
#2  ssa_convert_one_var (var=0x7f6cb181b548, ep=0x0) at ssa.c:210
#3  ssa_convert (ep=ep@entry=0x7f6cb1ca81d0) at ssa.c:395
#4  0x000055a4f9e93b61 in optimize (ep=ep@entry=0x7f6cb1ca81d0) at optimize.c:64
#5  0x000055a4f9e939f6 in linearize_fn (base_type=<optimized out>, sym=<optimized out>) at linearize.c:2516
#6  linearize_symbol (sym=<optimized out>) at linearize.c:2531
#7  0x000055a4f9e86f70 in check_symbols (list=0x7f6cb08e9890) at sparse.c:317
#8  0x000055a4f9e86a5d in main (argc=<optimized out>, argv=<optimized out>) at sparse.c:343

(gdb) print *s
$1 = {nbr = 0, off = 137, size = 30, sets = 0x55a4fb42e44c}

(gdb) info locals 
__idx = 4294967269
n = <optimized out>
__idx = <optimized out>
n = <optimized out>

So it looks like the sset is accessed with an invalid index.

regards
Christian




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-25  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 11:08 Segmentation fault when running sparse with current linux master Christian Eggers
2020-09-17 14:20 ` Luc Van Oostenryck
2020-09-21  7:44   ` Christian Eggers
2020-09-24 19:38     ` Luc Van Oostenryck
2020-09-25  5:37       ` Jiri Slaby
2020-09-25  8:46         ` Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).