HomeFreeBSD

libzpool: Disable -Wuse-after-free for dbuf.c.

Description

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: https://reviews.freebsd.org/D36818

Details

Provenance
jhbAuthored on Oct 3 2022, 11:10 PM
Reviewer
emaste
Differential Revision
D36818: libzpool: Disable -Wuse-after-free for dbuf.c.
Parents
rG67b075124918: bsd.sys.mk: Add NO_WUSE_AFTER_FREE helper variable.
Branches
Unknown
Tags
Unknown