zfs/cmd
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
..
arc_summary Removed Python 2 and Python 3.5- support 2022-01-13 09:51:12 -07:00
arcstat Removed Python 2 and Python 3.5- support 2022-01-13 09:51:12 -07:00
dbufstat Removed Python 2 and Python 3.5- support 2022-01-13 09:51:12 -07:00
fsck_zfs Add ShellCheck's `--enable=all` inside `cmd/` 2022-01-06 16:07:54 -08:00
mount_zfs Use fallthrough macro 2021-09-14 10:17:54 -06:00
raidz_test raidz_test: init_rand: fix unused, remove argsused 2021-12-21 12:05:11 -08:00
vdev_id Remove basename(1). Clean up/shorten some coreutils pipelines 2021-11-11 13:27:37 -07:00
zdb Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
zed zed-functions.sh: escape newline to produce valid json 2022-02-03 14:31:57 -08:00
zfs Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
zfs_ids_to_path zfs_ids_to_path: print correct wrong values 2021-04-11 11:58:16 -07:00
zgenhostid Prune /*NOTREACHED*/ 2021-07-26 12:07:26 -07:00
zhack module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zinject zinject: cancel_one_handler: fix unused, remove argsused 2021-12-21 12:05:11 -08:00
zpool Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
zpool_influxdb Fix trivial calloc(3) arguments order 2022-02-02 11:27:35 -08:00
zstream Report dnodes with faulty bonuslen 2022-02-03 14:28:19 -08:00
ztest Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
zvol_id Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
zvol_wait Add ShellCheck's `--enable=all` inside `cmd/` 2022-01-06 16:07:54 -08:00
Makefile.am Add ShellCheck's `--enable=all` inside `cmd/` 2022-01-06 16:07:54 -08:00