[GH-ISSUE #1005] Should -list=build info show asan support / memdbg /DEBUG #605

Closed
opened 2026-10-14 03:15:10 +07:00 by bsakaguchi · 7 comments
Owner

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

I htink it would be a good idea if --list=build-info would print an information if asan and/or memdbg (and may be DEBUG) are enabled, but not if they are disabled (don't give users the idea their build is missing something...)

Of course, only for autoconf builds, not for legacy builds.

Originally created by @frank-dittrich on GitHub (Jan 7, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1005 I htink it would be a good idea if --list=build-info would print an information if asan and/or memdbg (and may be DEBUG) are enabled, but not if they are disabled (don't give users the idea their build is missing something...) Of course, only for autoconf builds, not for legacy builds.
bsakaguchi 2026-10-14 03:15:10 +07:00
Author
Owner

@magnumripper commented on GitHub (Jan 7, 2015):

debug and memdbg are listed already. Is there a macro for knowing about ASAN?

<!-- gh-comment-id:68961373 --> @magnumripper commented on GitHub (Jan 7, 2015): debug and memdbg are listed already. Is there a macro for knowing about ASAN?
Author
Owner

@kholia commented on GitHub (Jan 7, 2015):

@magnumripper misc.h has something like,

#if /* is ASAN enabled? */ \
    __has_feature(address_sanitizer) /* Clang */ || \
    defined(__SANITIZE_ADDRESS__)  /* GCC 4.8.x */
  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
        __attribute__((no_address_safety_analysis)) \
        __attribute__((noinline))
#else
  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif

Hopefully this will help.

<!-- gh-comment-id:69014231 --> @kholia commented on GitHub (Jan 7, 2015): @magnumripper `misc.h` has something like, ``` #if /* is ASAN enabled? */ \ __has_feature(address_sanitizer) /* Clang */ || \ defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */ #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \ __attribute__((no_address_safety_analysis)) \ __attribute__((noinline)) #else #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS #endif ``` Hopefully this will help.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

I do not think memdbg or DEBUG are listed in build-info. I will see if I can add all 3

<!-- gh-comment-id:69020818 --> @jfoug commented on GitHub (Jan 7, 2015): I do not think memdbg or DEBUG are listed in build-info. I will see if I can add all 3
Author
Owner

@frank-dittrich commented on GitHub (Jan 7, 2015):

But please, only if enabled. I wouldn't want to give users the idea they misssed to enable something useful.

<!-- gh-comment-id:69021038 --> @frank-dittrich commented on GitHub (Jan 7, 2015): But please, only if enabled. I wouldn't want to give users the idea they misssed to enable something useful.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

1aba8f5

<!-- gh-comment-id:69029051 --> @jfoug commented on GitHub (Jan 7, 2015): 1aba8f5
Author
Owner

@magnumripper commented on GitHub (Jan 8, 2015):

debug and memdbg are listed already

I do not think memdbg or DEBUG are listed in build-info

I take it you don't trust me 😉 but look at the first line

Version: 1.8.0.2-jumbo-1-bleeding OMP-dbg-memdbg
Build: darwin14.0.0 64-bit AVX-autoconf
Arch: 64-bit LE
$JOHN is ../run/
Format interface version: 13
Max. number of reported tunable costs: 3
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
Max. Markov mode level: 400
Max. Markov mode password length: 30
Compiler version: 4.9.2
gcc version: 4.9.2
CUDA library version: 6.5
OpenCL library version: 1.2
OpenSSL library version: 0100010af
OpenSSL 1.0.1j 15 Oct 2014
GMP library version: 6.0.0
Regex library version: 1.1  (loaded: 1.1.DEV)
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's

Built with these debugging options
    memdbg=on
    '#define DEBUG' set
    ASan (Address Sanitizer debugging)

Your new output is better though. We should now drop that extra stuff on 1st line.

BTW, the first line of ../john (usage blob) is like this with ASAN, memdbg & -DDEBUG:

John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp-dbg [darwin14.0.0 64-bit AVX-autoconf]

Note that this is what will be seen eg. in TS output. We could

  1. drop that too and have TS harvest build-info instead
  2. keep it and enhance it so it also reflects memdbg and ASAN

I'm not sure which is best (you guys pick one :)

<!-- gh-comment-id:69128342 --> @magnumripper commented on GitHub (Jan 8, 2015): > > debug and memdbg are listed already > > I do not think memdbg or DEBUG are listed in build-info I take it you don't trust me :wink: but look at the first line ``` Version: 1.8.0.2-jumbo-1-bleeding OMP-dbg-memdbg Build: darwin14.0.0 64-bit AVX-autoconf Arch: 64-bit LE $JOHN is ../run/ Format interface version: 13 Max. number of reported tunable costs: 3 Rec file version: REC4 Charset file version: CHR3 CHARSET_MIN: 1 (0x01) CHARSET_MAX: 255 (0xff) CHARSET_LENGTH: 24 Max. Markov mode level: 400 Max. Markov mode password length: 30 Compiler version: 4.9.2 gcc version: 4.9.2 CUDA library version: 6.5 OpenCL library version: 1.2 OpenSSL library version: 0100010af OpenSSL 1.0.1j 15 Oct 2014 GMP library version: 6.0.0 Regex library version: 1.1 (loaded: 1.1.DEV) fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's Built with these debugging options memdbg=on '#define DEBUG' set ASan (Address Sanitizer debugging) ``` Your new output is better though. We should now drop that extra stuff on 1st line. BTW, the first line of ../john (usage blob) is like this with ASAN, memdbg & -DDEBUG: ``` John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp-dbg [darwin14.0.0 64-bit AVX-autoconf] ``` Note that **this** is what will be seen eg. in TS output. We could 1. drop that too and have TS harvest build-info instead 2. keep it and enhance it so it also reflects memdbg and ASAN I'm not sure which is best (you guys pick one :)
Author
Owner

@magnumripper commented on GitHub (Jan 8, 2015):

On second thought, the version string in the usage blob should be the same as the one in first line of build-info, no matter what option you pick. So this was, and still is, a minor bug.

<!-- gh-comment-id:69128436 --> @magnumripper commented on GitHub (Jan 8, 2015): On second thought, the version string in the usage blob should be **the same** as the one in first line of build-info, no matter what option you pick. So this was, and still is, a minor bug.
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#605
No description provided.