f32ec2346b
Much to my surprise bcopy() under Linux appears to copy the data in word sized chunks. It does the right thing but if you buffer is not a multiple of the word size you will be reading past the end of your buffer. Or at least that is what valgrind is reporting. We should be using mempcy() anyway on Linux so replace bcopy() with memcpy() to resolve the issue. ==305== Thread 211: ==305== Invalid read of size 8 ==305== at 0x3BCD28357D: _wordcopy_fwd_dest_aligned (in /lib64/libc-2.11.1.so) ==305== by 0x3BCD282B05: bcopy (in /lib64/libc-2.11.1.so) ==305== by 0x58D7FEF: dmu_write (dmu.c:730) ==305== by 0x591C942: spa_history_write (spa_history.c:165) ==305== by 0x591D255: spa_history_log_sync (spa_history.c:277) ==305== by 0x591D545: log_internal (spa_history.c:450) ==305== by 0x591D5EC: spa_history_log_internal (spa_history.c:475) ==305== by 0x5902319: dsl_prop_set_sync (dsl_prop.c:707) ==305== by 0x5906A7D: dsl_sync_task_group_sync (dsl_synctask.c:199) ==305== by 0x58FF4EC: dsl_pool_sync (dsl_pool.c:376) ==305== by 0x591744C: spa_sync (spa.c:5365) ==305== by 0x5922C85: txg_sync_thread (txg.c:414) |
||
---|---|---|
.. | ||
avl | ||
nvpair | ||
unicode | ||
zcommon | ||
zfs | ||
.gitignore | ||
Makefile.in |