Re: /bin/bash: line 1: 45878 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ -D__NDS32_EL__ --arch=nds32 -mlittle-endian -m32 -Wp,-MMD,ker...

From: Luc Van Oostenryck
Date: Tue Jun 07 2022 - 08:42:26 EST


On Sat, Nov 13, 2021 at 10:46:04PM +0800, Yafang Shao wrote:
> On Sat, Nov 13, 2021 at 12:25 PM kernel test robot <lkp@xxxxxxxxx> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
> > commit: 60f2415e19d3948641149ac6aca137a7be1d1952 sched: Make schedstats helpers independent of fair sched class
> > date: 6 weeks ago
> > config: nds32-randconfig-s031-20211015 (attached as .config)
> > compiler: nds32le-linux-gcc (GCC) 11.2.0

...

> > All errors (new ones prefixed by >>):
> >
> > include/linux/rtmutex.h:68:58: sparse: sparse: got $

Hi,

Apologies for this late reply.

The error was caused by the line:
#define tsk $r25
in arch/nds32/include/asm/current.h

I suppose it was only meant for assembly files but was also included in
(most) C files and the '$' character made sparse crash in some weird
circumstances. Patch is on the way.

-- Luc