]> granicus.if.org Git - zfs/commit
fix: Shift exponent too large
authorGvozden Neskovic <neskovic@gmail.com>
Wed, 31 Aug 2016 08:12:08 +0000 (10:12 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 29 Sep 2016 22:55:41 +0000 (15:55 -0700)
commit031d7c2fe6afaa78943bd0a563b91fc84ace42d7
treee30c20bc233c680f997e8b11948988c7e97f1c83
parent0b78aeae927833de580e140375a15ea5ea9d924a
fix: Shift exponent too large

Undefined operation is reported by running ztest (or zloop) compiled with GCC
UndefinedBehaviorSanitizer. Error only happens on top level of dnode indirection
with large enough offset values. Logically, left shift operation would work,
but bit shift semantics in C, and limitation of uint64_t, do not produce desired
result.

Issue #5059, #4883

Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
include/sys/dbuf.h
include/sys/dnode.h
lib/libspl/include/sys/sysmacros.h
module/zfs/dbuf.c
module/zfs/dnode.c