zfs/lib/libspl/include
Damian Szuberski 63652e1546
Add `--enable-asan` and `--enable-ubsan` switches
`configure` now accepts `--enable-asan` and `--enable-ubsan` switches
which results in passing `-fsanitize=address`
and `-fsanitize=undefined`, respectively, to the compiler. Those
flags are enabled in GitHub workflows for ZTS and zloop. Errors
reported by both instrumentations are corrected, except for:

- Memory leak reporting is (temporarily) suppressed. The cost of
  fixing them is relatively high compared to the gains.

- Checksum computing functions in `module/zcommon/zfs_fletcher*`
  have UBSan errors suppressed. It is completely impractical
  to enforce 64-byte payload alignment there due to performance
  impact.

- There's no ASan heap poisoning in `module/zstd/lib/zstd.c`. A custom
  memory allocator is used there rendering that measure
  unfeasible.

- Memory leaks detection has to be suppressed for `cmd/zvol_id`.
  `zvol_id` is run by udev with the help of `ptrace(2)`. Tracing is
  incompatible with memory leaks detection.

Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12928
2022-02-03 14:35:38 -08:00
..
os Remove NOTE(CONSTCOND) and note.h 2021-07-26 12:07:53 -07:00
rpc Changes to make openzfs build within FreeBSD buildworld 2020-07-31 21:30:31 -07:00
sys libspl: kmem.h: mark unused kmem_*() macro arguments used 2021-12-23 09:36:12 -08:00
util Drop unnecessary srcdir paths 2020-06-24 18:20:18 -07:00
Makefile.am libspl: include: ia32: remove 2022-01-26 11:37:45 -08:00
assert.h Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
atomic.h More aggsum optimizations 2021-06-07 09:02:47 -07:00
libdevinfo.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
libgen.h zpool import -d to specify device path 2018-01-26 10:49:46 -08:00
libshare.h lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
limits.h Fix -Werror,-Wmacro-redefined in limits.h 2020-09-01 16:22:09 -07:00
locale.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
statcommon.h Add linux libspl support 2010-08-31 13:41:59 -07:00
stdio.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
stdlib.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
string.h Check for strlcat and strlcpy 2018-12-11 16:01:41 -08:00
stropts.h Add linux libspl support 2010-08-31 13:41:59 -07:00
thread.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
tzfile.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
ucred.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
umem.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
unistd.h Retire HAVE_IOCTL_* configure checks 2014-08-28 07:45:54 -07:00
zone.h libspl: Provide platform-specific zone implementations 2020-08-31 19:43:30 -07:00