Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 17 Sep 2015 13:14:43 +0200
From: Frank Dittrich <>
Subject: Re: multi-threaded hash table initialization

On 09/17/2015 12:53 PM, Frank Dittrich wrote:
> On 09/17/2015 12:37 AM, magnum wrote:
>> FYI your patch doesn't apply cleanly to current bleeding (despite, I'm
>> pretty sure, there should be no clash at all with recent commits). This
>> happened with one of your patches yesterday also and it's probably very
>> trival this time too but it'll take me some head scratching and thus
>> some delay. It's not really a problem, just wanted to let you know.
> It also causes a warning for non-OMP builds:
> loader.c: In function ‘ldr_fix_database’:
> loader.c:1508:2: warning: ‘hash_alloc’ may be used uninitialized in this
> function [-Wmaybe-uninitialized]
>   memset(salt->hash, 0, hash_alloc);
>   ^
> loader.c:1409:23: note: ‘hash_alloc’ was declared here
>   size_t bitmap_alloc, hash_alloc

clang 3.5.0 (no openmp support) has these warnings:

/usr/bin/ar: creating aes.a
loader.c:211:18: warning: comparison of unsigned expression >= 0 is
always true [-Wtautological-compare]
        } while (--size >= 0);
                 ~~~~~~ ^  ~
loader.c:212:11: warning: comparison of unsigned expression < 0 is
always false [-Wtautological-compare]
        if (size < 0)
            ~~~~ ^ ~
loader.c:1434:6: warning: variable 'hash_alloc' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (hash_size > 1) {
loader.c:1508:24: note: uninitialized use occurs here
        memset(salt->hash, 0, hash_alloc);
loader.c:1434:2: note: remove the 'if' if its condition is always true
        if (hash_size > 1) {
loader.c:1409:33: note: initialize the variable 'hash_alloc' to silence
this warning
        size_t bitmap_alloc, hash_alloc;
                                        = 0
3 warnings generated.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.