[GH-ISSUE #1722] CPPFLAGS=-DDYNAMIC_DISABLED breaks --test --format=name #1135

Closed
opened 2026-10-14 03:36:19 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @frank-dittrich on GitHub (Aug 30, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1722

$ ./configure CPPFLAGS=-DDYNAMIC_DISABLED
[...]
UndefinedBehaviorSanitizer ("UbSan") ....... disabled

Install missing libraries to get any needed features that were omitted.

Configure finished.  Now 'make clean && make -s' to compile.
$ make -s clean     
$ make -s -j 16
dynamic_fmt.c:8103:2: warning: #warning Notice: Dynamic format disabled from build. [-Wcpp]
 #warning Notice: Dynamic format disabled from build.
  ^
/usr/bin/ar: creating aes.a

Make process completed.
$ ../run/john --test --format=bcrypt 
Will run 8 OpenMP threads
Benchmarking: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... (8xOMP) DONE
Many salts: 13336K c/s real, 1671K c/s virtual
Only one salt:  10125K c/s real, 1267K c/s virtual

Benchmarking: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 AVX-16]... (8xOMP) DONE
Speed for cost 1 (iteration count) of 725
Warning: "Many salts" test limited: 192/256
Many salts: 393216 c/s real, 49213 c/s virtual
Only one salt:  337920 c/s real, 42505 c/s virtual

Benchmarking: md5crypt, crypt(3) $1$ [MD5 128/128 AVX 4x3]... (8xOMP) DONE
Raw:    110208 c/s real, 13810 c/s virtual

Benchmarking: bcrypt ("$2a$05", 32 iterations) [Blowfish 32/64 X2]... (8xOMP) DONE
Speed for cost 1 (iteration count) of 32
Raw:    2946 c/s real, 370 c/s virtual

Benchmarking: scrypt (16384, 8, 1) [Salsa20/8 128/128 AVX]... (8xOMP) DONE
Speed for cost 1 (N) of 16384, cost 2 (r) of 8, cost 3 (p) of 1
Raw:    168 c/s real, 21.3 c/s virtual

Benchmarking: LM [DES 128/128 AVX-16]... (8xOMP) DONE
Raw:    58064K c/s real, 7276K c/s virtual

Benchmarking: AFS, Kerberos AFS [DES 48/64 4K]... DONE
Short:  379136 c/s real, 379136 c/s virtual
Long:   1359K c/s real, 1359K c/s virtual

Benchmarking: tripcode [DES 128/128 AVX-16]... (8xOMP) DONE
Raw:    7667K c/s real, 956073 c/s virtual

Benchmarking: agilekeychain, 1Password Agile Keychain [PBKDF2-SHA1 AES 128/128 AVX 4x]... (8xOMP) DONE
Speed for cost 1 (iteration count) of 1000
Raw:    29792 c/s real, 3742 c/s virtual

Benchmarking: aix-ssha1, AIX LPA {ssha1} [PBKDF2-SHA1 128/128 AVX 4x]... (8xOMP) ^CWait...
Session aborted
Originally created by @frank-dittrich on GitHub (Aug 30, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1722 ``` $ ./configure CPPFLAGS=-DDYNAMIC_DISABLED [...] UndefinedBehaviorSanitizer ("UbSan") ....... disabled Install missing libraries to get any needed features that were omitted. Configure finished. Now 'make clean && make -s' to compile. $ make -s clean $ make -s -j 16 dynamic_fmt.c:8103:2: warning: #warning Notice: Dynamic format disabled from build. [-Wcpp] #warning Notice: Dynamic format disabled from build. ^ /usr/bin/ar: creating aes.a Make process completed. $ ../run/john --test --format=bcrypt Will run 8 OpenMP threads Benchmarking: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... (8xOMP) DONE Many salts: 13336K c/s real, 1671K c/s virtual Only one salt: 10125K c/s real, 1267K c/s virtual Benchmarking: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 AVX-16]... (8xOMP) DONE Speed for cost 1 (iteration count) of 725 Warning: "Many salts" test limited: 192/256 Many salts: 393216 c/s real, 49213 c/s virtual Only one salt: 337920 c/s real, 42505 c/s virtual Benchmarking: md5crypt, crypt(3) $1$ [MD5 128/128 AVX 4x3]... (8xOMP) DONE Raw: 110208 c/s real, 13810 c/s virtual Benchmarking: bcrypt ("$2a$05", 32 iterations) [Blowfish 32/64 X2]... (8xOMP) DONE Speed for cost 1 (iteration count) of 32 Raw: 2946 c/s real, 370 c/s virtual Benchmarking: scrypt (16384, 8, 1) [Salsa20/8 128/128 AVX]... (8xOMP) DONE Speed for cost 1 (N) of 16384, cost 2 (r) of 8, cost 3 (p) of 1 Raw: 168 c/s real, 21.3 c/s virtual Benchmarking: LM [DES 128/128 AVX-16]... (8xOMP) DONE Raw: 58064K c/s real, 7276K c/s virtual Benchmarking: AFS, Kerberos AFS [DES 48/64 4K]... DONE Short: 379136 c/s real, 379136 c/s virtual Long: 1359K c/s real, 1359K c/s virtual Benchmarking: tripcode [DES 128/128 AVX-16]... (8xOMP) DONE Raw: 7667K c/s real, 956073 c/s virtual Benchmarking: agilekeychain, 1Password Agile Keychain [PBKDF2-SHA1 AES 128/128 AVX 4x]... (8xOMP) DONE Speed for cost 1 (iteration count) of 1000 Raw: 29792 c/s real, 3742 c/s virtual Benchmarking: aix-ssha1, AIX LPA {ssha1} [PBKDF2-SHA1 128/128 AVX 4x]... (8xOMP) ^CWait... Session aborted ```
bsakaguchi 2026-10-14 03:36:19 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jfoug commented on GitHub (Aug 30, 2015):

This has nothing to do with that switch. -format= is simply busted right now. I have not researched why, yet.

<!-- gh-comment-id:136174258 --> @jfoug commented on GitHub (Aug 30, 2015): This has nothing to do with that switch. -format= is simply busted right now. I have not researched why, yet.
Author
Owner

@frank-dittrich commented on GitHub (Aug 30, 2015):

Can you provide an example to reproduce without CPPFLAGS=-DDYNAMIC_DISABLED? I can't.

<!-- gh-comment-id:136174632 --> @frank-dittrich commented on GitHub (Aug 30, 2015): Can you provide an example to reproduce without CPPFLAGS=-DDYNAMIC_DISABLED? I can't.
Author
Owner

@jfoug commented on GitHub (Aug 30, 2015):

Ignore my comment. I was wrong. Lack of sleep I guess.

<!-- gh-comment-id:136174733 --> @jfoug commented on GitHub (Aug 30, 2015): Ignore my comment. I was wrong. Lack of sleep I guess.
Author
Owner

@magnumripper commented on GitHub (Aug 30, 2015):

This should fix it, but I haven't tested

diff --git a/src/john.c b/src/john.c
index 38f1e65..448acf5 100644
--- a/src/john.c
+++ b/src/john.c
@@ -278,8 +278,8 @@ static void john_register_one(struct fmt_main *format)
                        if ( (format->params.flags & FMT_DYNAMIC) == FMT_DYNAMIC) return;
                }
 #endif
-#ifndef DYNAMIC_DISABLED
                else if (strcasecmp(options.format, format->params.label)) {
+#ifndef DYNAMIC_DISABLED
                        if (!strncasecmp(options.format, "dynamic=", 8) && !strcasecmp(format->params.label, "dynamic=")) {
                                DC_HANDLE H;
                                if (!dynamic_compile(options.format, &H)) {
@@ -288,9 +288,9 @@ static void john_register_one(struct fmt_main *format)
                                } else
                                        return;
                        } else
+#endif
                                return;
                }
-#endif
        }

        fmt_register(format);
<!-- gh-comment-id:136176524 --> @magnumripper commented on GitHub (Aug 30, 2015): This should fix it, but I haven't tested ``` diff diff --git a/src/john.c b/src/john.c index 38f1e65..448acf5 100644 --- a/src/john.c +++ b/src/john.c @@ -278,8 +278,8 @@ static void john_register_one(struct fmt_main *format) if ( (format->params.flags & FMT_DYNAMIC) == FMT_DYNAMIC) return; } #endif -#ifndef DYNAMIC_DISABLED else if (strcasecmp(options.format, format->params.label)) { +#ifndef DYNAMIC_DISABLED if (!strncasecmp(options.format, "dynamic=", 8) && !strcasecmp(format->params.label, "dynamic=")) { DC_HANDLE H; if (!dynamic_compile(options.format, &H)) { @@ -288,9 +288,9 @@ static void john_register_one(struct fmt_main *format) } else return; } else +#endif return; } -#endif } fmt_register(format); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1135
No description provided.