Page MenuHomeFreeBSD

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

Authored by jhb on Sep 29 2022, 10:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 11 2024, 10:35 AM
Unknown Object (File)
Mar 11 2024, 10:35 AM
Unknown Object (File)
Mar 11 2024, 10:35 AM
Unknown Object (File)
Mar 8 2024, 12:21 AM
Unknown Object (File)
Jan 5 2024, 9:16 PM
Unknown Object (File)
Jan 5 2024, 9:16 PM
Unknown Object (File)
Jan 5 2024, 9:08 PM
Unknown Object (File)
Jan 3 2024, 10:48 PM
Subscribers
None

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 29 2022, 10:33 PM
jhb created this revision.

Maybe worth a brief comment beside CFLAGS.dbuf.c also, since based on the name this option seems like it would have no valid use.

This revision is now accepted and ready to land.Sep 29 2022, 11:32 PM
This revision was automatically updated to reflect the committed changes.