Page MenuHome GnuPG

Memory leaks when running `make check` under Clang sanitizers
Closed, ResolvedPublic

Description

Attached is the script I am using to acceptance test the suite. It requires
Clang 3.5 (Clang 3.5 recipe was provided with Bug 1872).

42139==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 240 byte(s) in 12 object(s) allocated from:

#0 0x49f3cb in __interceptor_malloc

/home/gpg-user/Clang-3.5/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3

#1 0x70d3dd in _ksba_malloc

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x70d3dd)

#2 0x6c9d7a in _ksba_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x6c9d7a)

#3 0x4cf48b in ksba_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4cf48b)

#4 0x4be72f in test_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4be72f)

#5 0x4bcf9e in main

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4bcf9e)

#6 0x2b15de559ec4 in __libc_start_main

/build/buildd/eglibc-2.19/csu/libc-start.c:287

Direct leak of 58 byte(s) in 2 object(s) allocated from:

#0 0x49f3cb in __interceptor_malloc

/home/gpg-user/Clang-3.5/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3

#1 0x70d3dd in _ksba_malloc

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x70d3dd)

#2 0x70db6f in _ksba_strdup

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x70db6f)

#3 0x6cbb8b in _ksba_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x6cbb8b)

#4 0x4cf48b in ksba_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4cf48b)

#5 0x4be72f in test_oid_to_str

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4be72f)

#6 0x4bcf9e in main

(/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid+0x4bcf9e)

#7 0x2b15de559ec4 in __libc_start_main

/build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: 298 byte(s) leaked in 14 allocation(s).

FAIL: t-oid

make[3]: *** [check-TESTS] Error 1
1 of 4 tests failed
Please report to http://bugs.gnupg.org

make[2]: *** [check-am] Error 2

make[3]: Leaving directory `/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests'
make[1]: * [check] Error 2
make[2]: Leaving directory `/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests'
make[1]: Leaving directory `/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests'
make:
* [check-recursive] Error 1

Details

Version
1.3.2

Event Timeline

JW set Version to 1.3.2.
JW added a subscriber: JW.

Attached is the script I am using to acceptance test the suite. It requires
Clang 3.5 (Clang 3.5 recipe was provided with Bug 1872).

Updated to include line numbers.

54400==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 240 byte(s) in 12 object(s) allocated from:

#0 0x49f45b in __interceptor_malloc

/home/gpg-user/Clang-3.5/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3

#1 0x5462d0 in _ksba_oid_to_str

/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/src/oid.c:75:16

#2 0x4bcce9 in main

/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid.c:164:7

#3 0x2b8edcf1aec4 in __libc_start_main

/build/buildd/eglibc-2.19/csu/libc-start.c:287

Direct leak of 58 byte(s) in 2 object(s) allocated from:

#0 0x49f45b in __interceptor_malloc

/home/gpg-user/Clang-3.5/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3

#1 0x5570e4 in _ksba_strdup

/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/src/util.c:162:13

#2 0x4bcce9 in main

/home/gpg-user/gcrypt-2.0-sanitize/libksba-1.3.2/tests/t-oid.c:164:7

#3 0x2b8edcf1aec4 in __libc_start_main

/build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: 298 byte(s) leaked in 14 allocation(s).

FAIL: t-oid

1 of 4 tests failed

Please report to http://bugs.gnupg.org

JW reopened this task as Open.
JW claimed this task.

Updated status to 'unread'. I'm not chatting.

werner added a subscriber: werner.

Use gnupg-devel for such things.