]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: fix address sanitizer issues
authorSami Kerola <kerolasa@iki.fi>
Sun, 14 Jul 2019 09:17:32 +0000 (10:17 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 14 Jul 2019 10:53:59 +0000 (11:53 +0100)
commitf55dd4cc2dadfa74e5a207a4058489fa4d10387a
treec2335b506b9ca3bba3bd17ca85a73ff1e3079d31
parent9175f39075b130bce00ed4b0d23be90a1defa915
libblkid: fix address sanitizer issues

With aligned attribute many blkid tests fail with following error.  So
instead of aligning to 4K add padding that makes the struct same size
without causing asan trip over.

    libblkid/src/superblocks/drbd.c:179:6: runtime error: member access
    within misaligned address 0x55913d7e6958 for type 'struct
    meta_data_on_disk_9', which requires 4096 byte alignment

In zfs structure it seems compiler is adding padding, that does not mix well
with be32_to_cpu() and other bit operations.

    libblkid/src/superblocks/zfs.c:109:23: runtime error: load of misaligned
    address 0x7ff6406540e4 for type 'uint32_t' (aka 'unsigned int'), which
    requires 8 byte alignment

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libblkid/src/superblocks/drbd.c
libblkid/src/superblocks/zfs.c