git: e67b246734e3 - main - libzpool: Disable -Wuse-after-free for dbuf.c.

From: John Baldwin <>
Date: Mon, 03 Oct 2022 23:11:25 UTC
The branch main has been updated by jhb:


commit e67b246734e37d1128fae0faecdd37806c5328ed
Author:     John Baldwin <>
AuthorDate: 2022-10-03 23:10:43 +0000
Commit:     John Baldwin <>
CommitDate: 2022-10-03 23:10:43 +0000

    libzpool: Disable -Wuse-after-free for dbuf.c.
    The debug traces for reference counting in ZFS use the pointer of the
    owning object as a "tag" for references to check that when an object
    drops a reference it had actually held one.  In a couple of places ZFS
    drops references after freeing the owning object.  In userland GCC
    realizes this is a use after free.  However, since only the value of
    the pointer is used, and it isn't indirected, the use is harmless.
    Reviewed by:    emaste
    Differential Revision:
 cddl/lib/libzpool/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index b9ef6575c99a..13671752fe88 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -286,6 +286,10 @@ CSTD=	c99
+# Pointer values are used as debugging "tags" to mark reference count
+# ownerships and in some cases the tag reference is dropped after an
+# object is freed.
 CFLAGS.entropy_common.c=	-fno-tree-vectorize
 CFLAGS.error_private.c=		-fno-tree-vectorize