On Tue, Aug 09, 2005 at 09:29:21AM -0700, Linus Torvalds wrote: > > > On Tue, 9 Aug 2005, Peter Hagervall wrote: > > > > Sparse segfaults when checking crypto/des.c in latest 2.6-git tree. > > Hmm.. Not for me, not on x86, not on ppc64. This is top-of-tree sparse? > Yes, assuming c8b9ce8f1ef27a0e77c87ea1581c6e2b33753e7a is the current HEAD. My arch is x86. > > Seems like clean_up_one_instruction() is called with bogus insn-pointer. > > Valgrind reports invalid reads in clean_up_insns, somewhere within the > > FOR_EACH_PTR-macros. > > Do you have a convenient way to run valgrind on it? Since I normally just > do kernel work, I've not used valgrind before. > > Linus The straightforward way of using it is just prepending the command line with 'valgrind', so in this case I have:
valgrind sparse -D__linux__ -Dlinux -D__STDC__ -Dunix \ -D__unix__ -D__i386__ -nostdinc -isystem \ /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include -Wp,-MD,crypto/.des.o.d \ -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include \ -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common -ffreestanding -Os \ -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pipe \ -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time \ -march=i686 -mregparm=3 -Iinclude/asm-i386/mach-default \ -Wdeclaration-after-statement -DMODULE -DKBUILD_BASENAME=des \ -DKBUILD_MODNAME=des crypto/des.c However, when running under valgrind it doesn't segfault, but a few invalid reads are reported. I'll try to track down the problem later tonight. -- Peter Hagervall - To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
