zap_leaf: make l_hash[] variable length to silence UBSAN
commitda88fc4ac9dcc21429d48d3e95d64186bb37d7fb
authorRob N <rob.norris@klarasystems.com>
Wed, 3 Apr 2024 23:38:18 +0000 (4 10:38 +1100)
committerTony Hutter <hutter2@llnl.gov>
Mon, 29 Apr 2024 20:50:05 +0000 (29 13:50 -0700)
tree5f85b39762ad322c6ad8d80baf428d5e9e725b74
parent889152ce4a8d82e5818384c3f95ef2446bea2621
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
include/sys/zap_leaf.h