Bug 5312

Summary: Installing 1.20.1 on Gentoo Linux triggers severe warnings
Product: Busybox Reporter: Charles <tanstaafl>
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Charles 2012-06-18 14:37:11 UTC
Hello,

When installing (actually I'm updating, but I'm fairly sure it has always produced these warnings) 1.20.1 on fully updated gentoo linux, the following severe warnings are triggered (with instructions to report this problem upstream, so here I am):

"QA Notice: Package triggers severe warnings which indicate that it
           may exhibit random runtime failures.
coreutils/basename.c:54:17: warning: array subscript is above array bounds
archival/libarchive/get_header_tar.c:268:34: warning: array subscript is above array bounds
init/init.c:1001:17: warning: array subscript is above array bounds
init/init.c:1082:41: warning: array subscript is above array bounds
libbb/appletlib.c:708:36: warning: array subscript is above array bounds
archival/libarchive/open_transformer.c:193:38: warning: array subscript is above array bounds
archival/libarchive/open_transformer.c:195:38: warning: array subscript is above array bounds
editors/vi.c:1292:13: warning: array subscript is above array bounds
editors/vi.c:1293:13: warning: array subscript is above array bounds
coreutils/stty.c:1259:11: warning: array subscript is above array bounds
coreutils/test.c:840:8: warning: array subscript is above array bounds
miscutils/mt.c:107:6: warning: array subscript is above array bounds
networking/nc_bloaty.c:753:7: warning: array subscript is above array bounds
shell/ash.c:3788:17: warning: array subscript is above array bounds
shell/ash.c:10783:8: warning: array subscript is above array bounds
shell/ash.c:10785:13: warning: array subscript is above array bounds
util-linux/getopt.c:325:37: warning: array subscript is above array bounds
libbb/single_argv.c:13:17: warning: array subscript is above array bounds
util-linux/mdev.c:735:17: warning: array subscript is above array bounds
util-linux/rtcwake.c:180:6: warning: array subscript is above array bounds
util-linux/rtcwake.c:205:6: warning: array subscript is above array bounds
libbb/appletlib.c:708:36: warning: array subscript is above array bounds
Please do not file a Gentoo bug and instead report the above QA
issues directly to the upstream developers of this software.
Homepage: http://www.busybox.net/"
Comment 1 Denys Vlasenko 2012-06-18 22:57:25 UTC
Thee warnings seem to be bogus.

"libbb/single_argv.c:13:17: warning: array subscript is above array bounds"

char* FAST_FUNC single_argv(char **argv)
{
        if (argv[1] && strcmp(argv[1], "--") == 0)
                argv++;
        if (!argv[1] || argv[2])
                bb_show_usage();
        return argv[1];
}

I don't see how gcc arrived to this conclusion.
Comment 2 Charles 2012-06-19 09:48:51 UTC
<shrug>

Since ianap, I don't either... ;)

Anything else I can do to provide more info?
Comment 3 Charles 2012-06-19 10:48:05 UTC
Any chance you could provide me some more feedback as to WHY this is invalid, so maybe the gentoo ebuild maintainer could fix this on his end?

The fact is, it IS throwing those errors.
Comment 4 Mike Frysinger 2012-10-22 02:47:42 UTC
(In reply to comment #3)

it's not really something to be "fixed" in the ebuild.  it's a code snippet to take to upstream gcc and fix the compiler if it is actually issuing a bogus warning.