mirror_zfs/cmd/zdb
Richard Yao a6ccb36b94
Add defensive assertions
Coverity complains about possible bugs involving referencing NULL return
values and division by zero. The division by zero bugs require that a
block pointer be corrupt, either from in-memory corruption, or on-disk
corruption. The NULL return value complaints are only bugs if
assumptions that we make about the state of data structures are wrong.
Some seem impossible to be wrong and thus are false positives, while
others are hard to analyze.

Rather than dismiss these as false positives by assuming we know better,
we add defensive assertions to let us know when our assumptions are
wrong.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13972
2022-10-12 11:25:18 -07:00
..
Makefile.am autoconf: use include directives instead of recursing down cmd 2022-05-10 10:18:38 -07:00
zdb_il.c Add defensive assertions 2022-10-12 11:25:18 -07:00
zdb.c Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zdb.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00