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
This commit is contained in:
parent
67b0751249
commit
e67b246734
@ -286,6 +286,10 @@ CSTD= c99
|
||||
|
||||
CFLAGS+= -g -DDEBUG=1
|
||||
|
||||
# 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.dbuf.c= ${NO_WUSE_AFTER_FREE}
|
||||
CFLAGS.entropy_common.c= -fno-tree-vectorize
|
||||
CFLAGS.entropy_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
|
||||
CFLAGS.error_private.c= -fno-tree-vectorize
|
||||
|
Loading…
Reference in New Issue
Block a user