[GH-ISSUE #980] memdbg reports mem leaks for rar format #581

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

Originally created by @frank-dittrich on GitHub (Dec 31, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/980

I used

./configure --enable-asan --enable-memdbg

on a 64bit linux system.

(bleeding-jumbo)run $ ./john --test=0 --format=rar
Will run 8 OpenMP threads
Testing: rar, RAR3 (4 characters) [SHA1 AES 32/64]... (8xOMP) PASS
Mem leak: 152 bytes, alloc_num 180, file rar_fmt_plug.c, line 328
Mem leak: 136 bytes, alloc_num 170, file rar_fmt_plug.c, line 328
Mem leak: 104 bytes, alloc_num 160, file rar_fmt_plug.c, line 304
Mem leak: 104 bytes, alloc_num 150, file rar_fmt_plug.c, line 304
Mem leak: 104 bytes, alloc_num 140, file rar_fmt_plug.c, line 304
Mem leak: 152 bytes, alloc_num 128, file rar_fmt_plug.c, line 328
Mem leak: 136 bytes, alloc_num 118, file rar_fmt_plug.c, line 328
Mem leak: 104 bytes, alloc_num 108, file rar_fmt_plug.c, line 304
Mem leak: 104 bytes, alloc_num 98, file rar_fmt_plug.c, line 304
Mem leak: 104 bytes, alloc_num 88, file rar_fmt_plug.c, line 304
Originally created by @frank-dittrich on GitHub (Dec 31, 2014). Original GitHub issue: https://github.com/openwall/john/issues/980 I used ``` ./configure --enable-asan --enable-memdbg ``` on a 64bit linux system. ``` (bleeding-jumbo)run $ ./john --test=0 --format=rar Will run 8 OpenMP threads Testing: rar, RAR3 (4 characters) [SHA1 AES 32/64]... (8xOMP) PASS Mem leak: 152 bytes, alloc_num 180, file rar_fmt_plug.c, line 328 Mem leak: 136 bytes, alloc_num 170, file rar_fmt_plug.c, line 328 Mem leak: 104 bytes, alloc_num 160, file rar_fmt_plug.c, line 304 Mem leak: 104 bytes, alloc_num 150, file rar_fmt_plug.c, line 304 Mem leak: 104 bytes, alloc_num 140, file rar_fmt_plug.c, line 304 Mem leak: 152 bytes, alloc_num 128, file rar_fmt_plug.c, line 328 Mem leak: 136 bytes, alloc_num 118, file rar_fmt_plug.c, line 328 Mem leak: 104 bytes, alloc_num 108, file rar_fmt_plug.c, line 304 Mem leak: 104 bytes, alloc_num 98, file rar_fmt_plug.c, line 304 Mem leak: 104 bytes, alloc_num 88, file rar_fmt_plug.c, line 304 ```
bsakaguchi 2026-10-14 03:14:09 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

(bleeding-jumbo)run $ ./john --test=0 --format=zip
Will run 8 OpenMP threads
Testing: ZIP, WinZip [PBKDF2-SHA1 8x SSE2]... (8xOMP) PASS
Mem leak: 576 bytes, alloc_num 340, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 330, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 320, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 310, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 300, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 290, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 280, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 270, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 260, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 250, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 240, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 230, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 220, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 210, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 200, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 190, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 180, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 170, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 160, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 150, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 140, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 130, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 120, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 110, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 100, file zip_fmt_plug.c, line 359
Mem leak: 576 bytes, alloc_num 90, file zip_fmt_plug.c, line 359

<!-- gh-comment-id:68451411 --> @jfoug commented on GitHub (Dec 31, 2014): (bleeding-jumbo)run $ ./john --test=0 --format=zip Will run 8 OpenMP threads Testing: ZIP, WinZip [PBKDF2-SHA1 8x SSE2]... (8xOMP) PASS Mem leak: 576 bytes, alloc_num 340, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 330, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 320, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 310, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 300, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 290, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 280, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 270, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 260, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 250, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 240, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 230, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 220, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 210, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 200, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 190, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 180, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 170, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 160, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 150, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 140, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 130, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 120, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 110, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 100, file zip_fmt_plug.c, line 359 Mem leak: 576 bytes, alloc_num 90, file zip_fmt_plug.c, line 359
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

Dyna salt, allocated type not cleaning up. I thought we had this working. I guess something happened.

<!-- gh-comment-id:68451441 --> @jfoug commented on GitHub (Dec 31, 2014): Dyna salt, allocated type not cleaning up. I thought we had this working. I guess something happened.
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

After a couple changes to the dump_stuff messages used (for DYNA_SALT_DEBUG builds), to trim down some extra long lines of output, I get this for a -form=zip run

Benchmarking: ZIP, WinZip [PBKDF2-SHA1 4x SSE2]...
Raw:    MaxKeys=        384
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 4080
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 386
dyna_salt_cmp
p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\formats.c line 424
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 440
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 441
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\formats.c line 459
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 606
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\bench.c line 199
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\bench.c line 199
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\bench.c line 314
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\bench.c line 314
DONE
Raw:    48.3 c/s

Mem leak: 564 bytes, alloc_num 212, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 202, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 192, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 182, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 172, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 162, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 152, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 142, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 132, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 122, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 112, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 102, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 92, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 82, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 72, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Mem leak: 564 bytes, alloc_num 62, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359
Press any key to continue . . .

Run inside of VC. To me, it 'appears' that things should be working, BUT something is not being freed. At least the functions are being called. Now I can step and see why this is not freeing. But if you see in the end, that final free brings the allocated block count down to #0, so it 'should' have removed all objects. Obviously something is not actually freeing the memory properly, however.

<!-- gh-comment-id:68463751 --> @jfoug commented on GitHub (Dec 31, 2014): After a couple changes to the dump_stuff messages used (for DYNA_SALT_DEBUG builds), to trim down some extra long lines of output, I get this for a -form=zip run ``` Benchmarking: ZIP, WinZip [PBKDF2-SHA1 4x SSE2]... Raw: MaxKeys= 384 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 p2 : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 1000cc41 9ffba763 44938a7d 00000000 00000000 fb28d3fd 98330205 8c5296c0 7442502a e05bb59a db9eb237 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 4080 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 386 dyna_salt_cmp p1 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 p2 : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\formats.c line 424 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 440 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 441 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\formats.c line 459 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 606 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\bench.c line 199 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\bench.c line 199 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\bench.c line 314 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\bench.c line 314 DONE Raw: 48.3 c/s Mem leak: 564 bytes, alloc_num 212, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 202, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 192, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 182, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 172, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 162, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 152, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 142, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 132, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 122, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 112, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 102, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 92, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 82, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 72, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Mem leak: 564 bytes, alloc_num 62, file c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c, line 359 Press any key to continue . . . ``` Run inside of VC. To me, it 'appears' that things should be working, BUT something is not being freed. At least the functions are being called. Now I can step and see why this is not freeing. But if you see in the end, that final free brings the allocated block count down to #0, so it 'should' have removed all objects. Obviously something is not actually freeing the memory properly, however.
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

Found the leak (I think). It is in new code @magnumripper just did for salt dupe check failure detection. He allocates a temp buffer large enough to hold the first salt. He then memcpy the salt into that buffer. Then he calls salt() again, and a compare is done. He then frees the memory buffer.

Well, it works, until you get to a dyna_salt item, where the salt itself is allocated. In that case, the free to the underlying object needs to be done. All the salt value JtR gets is a memory buffer that contains a pointer.

I will have to see how to fix this, but @frank-dittrich, good catch. I told ppl, that memdbg was useful. I will be adding some enhancements to memdbg, and dynasalt shortly also. It may all wrap up on one patch.

<!-- gh-comment-id:68468377 --> @jfoug commented on GitHub (Dec 31, 2014): Found the leak (I think). It is in new code @magnumripper just did for salt dupe check failure detection. He allocates a temp buffer large enough to hold the first salt. He then memcpy the salt into that buffer. Then he calls salt() again, and a compare is done. He then frees the memory buffer. Well, it works, until you get to a dyna_salt item, where the salt itself is allocated. In that case, the free to the underlying object needs to be done. All the salt value JtR gets is a memory buffer that contains a pointer. I will have to see how to fix this, but @frank-dittrich, good catch. I told ppl, that memdbg was useful. I will be adding some enhancements to memdbg, and dynasalt shortly also. It may all wrap up on one patch.
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

....  clip ....
p_fmt_plug.c mdbg_allocline=359
fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7
fmt_default_dyna_salt_hash(): cmp size 552
fmt_default_dyna_salt_hash(): return 1181
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\formats.c line 609  mdbg_alloc-cnt=219  mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359
++ Allocating a salt #1  from: c:\phpbb\johnripper\bleed1\src\bench.c line 200  mdbg_alloc-cnt=222  mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359
++ Allocating a salt #2  from: c:\phpbb\johnripper\bleed1\src\bench.c line 200  mdbg_alloc-cnt=225  mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359
-- Freeing a salt    #1  from: c:\phpbb\johnripper\bleed1\src\bench.c line 314  mdbg_alloc-cnt=222  mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359
-- Freeing a salt    #0  from: c:\phpbb\johnripper\bleed1\src\bench.c line 314  mdbg_alloc-cnt=225  mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359
DONE
Raw:    48.7 c/s

At Program Exit
MemDbg_Validate level 0 checking Passed

There was a dyna_salt_create() missing and a dyna_salt_remove() missing within the new code. Thus, we still 'appeared' to have a correct matching number of salt allocs, to match the salt frees, BUT there was a whole new salt() called, that was untracked. Actually, one was being freed, that did not match the one allocated, which is where I found the bug.

<!-- gh-comment-id:68468702 --> @jfoug commented on GitHub (Dec 31, 2014): ``` .... clip .... p_fmt_plug.c mdbg_allocline=359 fmt_default_dyna_salt_hash : 10020000 3000f035 855f6969 3734c7be 8c1093ea 5bae6114 c02aa1d4 2cc7623c 0746979c 6c2ce78e 8492e9ab 1d0954b7 fmt_default_dyna_salt_hash(): cmp size 552 fmt_default_dyna_salt_hash(): return 1181 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\formats.c line 609 mdbg_alloc-cnt=219 mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359 ++ Allocating a salt #1 from: c:\phpbb\johnripper\bleed1\src\bench.c line 200 mdbg_alloc-cnt=222 mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359 ++ Allocating a salt #2 from: c:\phpbb\johnripper\bleed1\src\bench.c line 200 mdbg_alloc-cnt=225 mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359 -- Freeing a salt #1 from: c:\phpbb\johnripper\bleed1\src\bench.c line 314 mdbg_alloc-cnt=222 mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359 -- Freeing a salt #0 from: c:\phpbb\johnripper\bleed1\src\bench.c line 314 mdbg_alloc-cnt=225 mdbg_allocfile=c:\phpbb\johnripper\bleed1\src\zip_fmt_plug.c mdbg_allocline=359 DONE Raw: 48.7 c/s At Program Exit MemDbg_Validate level 0 checking Passed ``` There was a dyna_salt_create() missing and a dyna_salt_remove() missing within the new code. Thus, we still 'appeared' to have a correct matching number of salt allocs, to match the salt frees, BUT there was a whole new salt() called, that was untracked. Actually, one was being freed, that did not match the one allocated, which is where I found the bug.
Author
Owner

@jfoug commented on GitHub (Dec 31, 2014):

Fixed with 576888c @frank-dittrich please test.

I have a larger enhancement coming shortly for memdbg and dyna_salt, but will hold off until I hear good or bad about this patch.

<!-- gh-comment-id:68472035 --> @jfoug commented on GitHub (Dec 31, 2014): Fixed with 576888c @frank-dittrich please test. I have a larger enhancement coming shortly for memdbg and dyna_salt, but will hold off until I hear good or bad about this patch.
Author
Owner

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

Works for me, thanks.

<!-- gh-comment-id:68481635 --> @frank-dittrich commented on GitHub (Jan 1, 2015): Works for me, thanks.
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#581
No description provided.