]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
We need to wrap isc__mem_putanddetach in tkey_test.c unit too now
authorOndřej Surý <ondrej@sury.org>
Thu, 25 Jul 2019 19:36:35 +0000 (21:36 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 31 Jul 2019 08:26:41 +0000 (10:26 +0200)
lib/dns/tests/Makefile.in
lib/dns/tests/tkey_test.c

index 44e12b1bda619ca369c88dff9d428faa3eeb2482..98dc6512854a5d89b0ced3fc4157fc0d6ccdccbe 100644 (file)
@@ -234,7 +234,12 @@ time_test@EXEEXT@: time_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
                ${LDFLAGS} -o $@ time_test.@O@ dnstest.@O@ \
                ${DNSLIBS} ${ISCLIBS} ${LIBS}
 
-WRAP_OPTIONS = -Wl,--wrap=isc__mem_put,--wrap=isc__mem_get,--wrap=isc_mem_attach,--wrap=isc_mem_detach
+tkey_test@EXEEXT@: WRAP_OPTIONS = \
+       -Wl,--wrap=isc__mem_put \
+       -Wl,--wrap=isc__mem_get \
+       -Wl,--wrap=isc_mem_attach \
+       -Wl,--wrap=isc_mem_detach \
+       -Wl,--wrap=isc__mem_putanddetach
 tkey_test@EXEEXT@: tkey_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
        if test "${LD_WRAP_TESTS}" = true; then WRAP="${WRAP_OPTIONS}"; fi; \
        ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \
index f78cb2e6ae0900d7d8a852b95ca71b907aefb120..66a30b9f2954332d6dbc87be7d33debbf9d26811 100644 (file)
@@ -42,6 +42,8 @@ void
 __wrap_isc_mem_attach(isc_mem_t *source0, isc_mem_t **targetp);
 void
 __wrap_isc_mem_detach(isc_mem_t **ctxp);
+void
+__wrap_isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size);
 
 void *
 __wrap_isc__mem_get(isc_mem_t *mctx, size_t size)
@@ -74,6 +76,14 @@ __wrap_isc_mem_detach(isc_mem_t **ctxp) {
        *ctxp = NULL;
 }
 
+void
+__wrap_isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size) {
+       isc_mem_t *ctx = *ctxp;
+       __wrap_isc__mem_put(ctx, ptr, size);
+       __wrap_isc_mem_detach(ctxp);
+}
+
+
 #if ISC_MEM_TRACKLINES
 #define FLARG          , const char *file, unsigned int line
 #else
@@ -106,6 +116,13 @@ isc_mem_detach(isc_mem_t **ctxp) {
        __wrap_isc_mem_detach(ctxp);
 }
 
+__attribute__((weak)) void
+isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG){
+       UNUSED(file);
+       UNUSED(line);
+       __wrap_isc__mem_putanddetach(ctxp, ptr, size);
+}
+
 static int
 _setup(void **state) {
        dns_tkeyctx_t *tctx = NULL;