]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Suppressing memory leaks procuded by LeakSanitizer
authorMatthijs Mekking <matthijs@isc.org>
Wed, 22 Dec 2021 15:53:30 +0000 (16:53 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 27 Jan 2022 09:49:47 +0000 (10:49 +0100)
These memory leaks are a known issue in libp11: From Timo Teras:

The relevant code is:

  https://github.com/OpenSC/libp11/blob/master/src/eng_front.c#L114-L123

The authors of libp11 did not get the locking right and decided
that having intentional memory leaks is better than risking a deadlock.

The leak logs indicate that it is the cached structures that should
have been freed.

These are not a run-time leaks, so suppressing these leaks is probably
okay.

.gitlab-ci.yml
suppr-lsan.txt [new file with mode: 0644]

index 043968b93f533da70cc0737916940ba971b96736..2816466c659e3f5ef0f942d99cf8f88454544949 100644 (file)
@@ -937,6 +937,7 @@ gcc:asan:
 system:gcc:asan:
   variables:
     SOFTHSM2_MODULE: "/lib64/libsofthsm2.so"
+    LSAN_OPTIONS: "suppressions=/builds/isc-projects/bind9/suppr-lsan.txt"
   <<: *fedora_35_amd64_image
   <<: *system_test_job
   needs:
diff --git a/suppr-lsan.txt b/suppr-lsan.txt
new file mode 100644 (file)
index 0000000..050b86e
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+# These are known leaks in libp11.
+leak:BN_MONT_CTX_new
+leak:C_LoadModule
+leak:ctx_new
+leak:ctx_try_load_object
+leak:dlfcn_name_converter
+leak:EC_GROUP_set_seed
+leak:CRYPTO_strdup
+leak:CRYPTO_zalloc
+leak:pkcs11_check_token
+leak:pkcs11_CTX_new
+leak:pkcs11_enumerate_slots
+leak:pkcs11_getattr_alloc
+leak:pkcs11_init_key
+leak:pkcs11_strdup