Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 13 May 2013 13:04:38 +0400
From: Solar Designer <>
Subject: Re: Unused global symbols in core

On Sat, May 11, 2013 at 07:55:25PM +0400, Alexander Cherepanov wrote:
> There are unused global symbols in JtR. Here is the analysis for the core:

Thanks!  What tool are you using to find these?

> 1. Easy to fix:
> crk_remove_hash                 cracker.o <- cracker.c:135


> 2. Easy to fix:
> DES_KS_table                    DES_std.o

Won't fix: making DES_KS_table static, but not DES_KS_current (because
of its use from other source files), may result in them being placed
into different sections on some platforms, which may have performance
impact.  Not that performance of this code matters much now that we're
using bitslice DES in almost all cases, but I also don't feel like
putting time into it now, and if I were to put more time into it, I'd be
making more changes.

> 3. Not used but supposed to be used (described in .h)?
> itoa64                          common.o <- common.c:11

I actually committed the patch for this, only to notice that itoa64[] is
heavily used from other source files in jumbo.  Reverted until we
possibly have a #define JOHN_JUMBO or something.

> 4. Not used but supposed to be used (described in .h)?
> fmt_default_valid               formats.o <- formats.c:257

Dropped.  There's no valid reason to ever use a fmt_default_valid().

> fmt_default_binary              formats.o <- formats.c:267

Preserved due to use in jumbo.

> 5. The following are described in rules.h but should they really be 
> exported?
> rules_errno                     rules.o
> rules_line                      rules.o
> rules_errors                    rules.o <- rules.c:20
> rules_check                     rules.o <- rules.c:959

Moved to rules.c as you suggest.  Also moved the RULES_ERROR_* macros.

> 6. Not used in JtR itself but used in best.c:
> benchmark_cps                   bench.o <- bench.c:211
> benchmark_format                bench.o <- bench.c:87

I left these as-is.



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.