]> git.proxmox.com Git - mirror_zfs.git/commit
Assert alignment in umem_alloc_aligned
authorRichard Yao <ryao@gentoo.org>
Tue, 21 Jan 2014 00:47:21 +0000 (19:47 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 Mar 2014 19:01:37 +0000 (12:01 -0700)
commit8959b29e31975a281acc411e9f60203f09716e79
treee46187d1290f90fcba0d5ce457ee13c2e0b08609
parent312f82ce65f37ed60f440194623fe38cdb1f601d
Assert alignment in umem_alloc_aligned

Valgrind suggests that the address we are returning is not properly
aligned, so lets add an assertion.

==87740==  Address 0x1012a22a is 554 bytes inside a block of size 4,096
alloc'd
==87740==    at 0x4C2BBA0: memalign (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==87740==    by 0x4C2BCC7: posix_memalign (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==87740==    by 0x52FA845: zio_buf_alloc (umem.h:101)
==87740==    by 0x52F6226: zil_alloc_lwb (zil.c:463)
==87740==    by 0x52F8559: zil_commit (zil.c:566)
==87740==    by 0x40611D: ztest_freeze (ztest.c:5909)
==87740==    by 0x4066A7: ztest_init (ztest.c:6048)
==87740==    by 0x407AF4: main (ztest.c:6226)

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2174
lib/libspl/include/umem.h