Workaround UBSAN errors for variable arrays

This gets around UBSAN errors when using arrays at the end of
structs.  It converts some zero-length arrays to variable length
arrays and disables UBSAN checking on certain modules.

It is based off of the patch from #15460.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Issue #15145
Closes #15510
This commit is contained in:
Tony Hutter
2023-11-12 16:26:07 -08:00
committed by Brian Behlendorf
parent 94a830adf6
commit bb1dd98bcc
4 changed files with 9 additions and 3 deletions
+2
View File
@@ -69,6 +69,8 @@ OBJECT_FILES_NON_STANDARD_aesni-gcm-x86_64.o := y
OBJECT_FILES_NON_STANDARD_sha256_impl.o := y
OBJECT_FILES_NON_STANDARD_sha512_impl.o := y
UBSAN_SANITIZE_modhash.o := n
ICP_DIRS = \
api \
core \