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
F102723859: D36818.diff
Sat, Nov 16, 9:26 AM
Unknown Object (File)
Sep 28 2024, 1:25 PM
Unknown Object (File)
Sep 24 2024, 2:28 AM
Unknown Object (File)
Sep 24 2024, 12:17 AM
Unknown Object (File)
Sep 18 2024, 10:10 PM
Unknown Object (File)
Sep 18 2024, 1:37 PM
Unknown Object (File)
Sep 18 2024, 11:33 AM
Unknown Object (File)
Sep 18 2024, 1:51 AM
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.