HomeFreeBSD

Suppress Clang Static Analyzer defect report in abd_get_size()

Description

Suppress Clang Static Analyzer defect report in abd_get_size()

Clang's static analyzer reports a possible NULL pointer dereference in
abd_get_size() when called from vdev_draid_map_alloc_write() called from
vdev_draid_map_alloc_row() and vdc->vdc_nparity == 0. This should be
impossible, so we add an assertion to silence the defect report.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14575

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Feb 7 2023, 11:47 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 8 2023, 9:51 PM
Parents
rG9368b3877c06: Fix TOCTOU race in zpool_do_labelclear()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8b72dfed11d0: Suppress Clang Static Analyzer defect report in abd_get_size() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Mar 8 2023, 9:51 PM