lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Feb 2009 10:21:37 -0800 (PST)
From:	bugme-daemon@...zilla.kernel.org
To:	linux-ext4@...r.kernel.org
Subject: [Bug 12676] fs/ext4/extents.c: In function  ‘ext4 ext search right’: fs/ext4/extents.c:1120: warning:  ‘ix’ may be used uninitialized in this function

http://bugzilla.kernel.org/show_bug.cgi?id=12676





------- Comment #2 from tytso@....edu  2009-02-10 10:21 -------
On Mon, Feb 09, 2009 at 03:15:49AM -0800, bugme-daemon@...zilla.kernel.org
wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=12676
> 
>            Summary: fs/ext4/extents.c: In function
>                     ‘ext4_ext_search_right’: fs/ext4/extents.c:1120:
>                     warning: ‘ix’ may be used uninitialized in this
>                     function

> When compiling gets this error on Ext4 FS:
> "fs/ext4/extents.c: In function ‘ext4_ext_search_right’:
> fs/ext4/extents.c:1120: warning: ‘ix’ may be used uninitialized in this
> function
> "

What version of gcc are you using to compile your kernel?  This looks
like the case of "gcc is stupid not to notice that depth must be
non-zero, so ix is always initialized".  Which doesn't seem to be the
case with gcc 4.3.2, but it might be true with an older version of
gcc.

We can shut up gcc by forcibly initializing ix, but if this is only a
problem with older gcc's, as it seems, it's probably best not to
clutter the source (and the compiled binary) with an unneeded
initialization:

        /* go up and search for index to the right */
        while (--depth >= 0) {
                ix = path[depth].p_idx;
                if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
                        goto got_index;
        }

        /* we've gone up to the root and found no index to the right */
        return 0;

got_index:
        /* we've found index to the right, let's
         * follow it and find the closest allocated
         * block to the right */
        ix++;
        ^^^^^ Gee, aren't (some verions of) gcc stupid?


                                                - Ted


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ