[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nasty bug in /usr/sbin/grub-probe



On 4/3/22 17:19, Dennis Clarke wrote:
> I am curious if you can get the linux-4.19.114 kernel to compile.  For me it just blows up with :
> 
> .
> .
> .
> arch/sparc/kernel/mdesc.c: In function 'mdesc_node_by_name':
> arch/sparc/kernel/mdesc.c:648:22: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
>   648 |                 if (!strcmp(names + ep[ret].name_offset, name))
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/sparc/kernel/mdesc.c:78:33: note: at offset 16 into source object 'mdesc' of size 16
>    78 |         struct mdesc_hdr        mdesc;
>       |                                 ^~~~~
> arch/sparc/kernel/mdesc.c: In function 'mdesc_get_property':
> arch/sparc/kernel/mdesc.c:693:22: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
>   693 |                 if (!strcmp(names + ep->name_offset, name)) {
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/sparc/kernel/mdesc.c:78:33: note: at offset 16 into source object 'mdesc' of size 16
>    78 |         struct mdesc_hdr        mdesc;
>       |                                 ^~~~~
> arch/sparc/kernel/mdesc.c: In function 'mdesc_next_arc':
> arch/sparc/kernel/mdesc.c:720:21: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
>   720 |                 if (strcmp(names + ep->name_offset, arc_type))
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/sparc/kernel/mdesc.c:78:33: note: at offset 16 into source object 'mdesc' of size 16
>    78 |         struct mdesc_hdr        mdesc;
>       |                                 ^~~~~
> cc1: all warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:304: arch/sparc/kernel/mdesc.o] Error 1
> make[1]: *** [scripts/Makefile.build:544: arch/sparc/kernel] Error 2
> make: *** [Makefile:1053: arch/sparc] Error 2
> 
> 
> Not sure what to make of that.

Well, it's up right there, you are building with -Werror enabled. You have to disable that.

> My intuition here tells me the bug is likely in arch/sparc/kernel/syscalls.S
> which changed slightly since the 4.19.114 days. Looking
> previous I see no change in that source file. Regardless, this is just a
> hunch without a shred of proof. Yet.

There is no bug. Just your compiler set to treat warning as errors as can be seen
from the error message above. You have to disable CONFIG_WERROR.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: