HomeFreeBSD

zap_leaf: make l_hash[] variable length to silence UBSAN

Description

zap_leaf: make l_hash[] variable length to silence UBSAN

When UBSAN is active and OpenZFS is a debug build, the l_hash assert at
the bottom of zap_open_leaf() causes UBSAN to complain.

This follows the example in 786641dcf to shut it up.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #15964

Details

Provenance
rob.norris_klarasystems.comAuthored on Apr 3 2024, 11:38 PM
Tony Hutter <hutter2@llnl.gov>Committed on Apr 29 2024, 8:50 PM
Parents
rG889152ce4a8d: Give a better message from 'zpool get' with invalid pool name
Branches
Unknown
Tags
Unknown