9 Commits

Author SHA1 Message Date
Benjamin
d5db64bdbf
upgrade golang to 1.17 and replace iouitl with io and os (#297) 2022-01-29 19:28:06 -08:00
Josh Rickmar
543c40ab41 Fix unsafe pointer conversions caught by Go 1.14 checkptr 2020-03-18 21:18:39 -04:00
Gyuho Lee
76a4670663 *: update import paths "go.etcd.io/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:15:54 -07:00
Lorenzo Stoakes
97aba5586d bucket: correct broken unaligned load/store in armv5
armv5 devices and older (i.e. <= arm9 generation) require addresses that are
stored to and loaded from to to be 4-byte aligned.

If this is not the case the lower 2 bits of the address are cleared and the load
is performed in an unexpected order, including up to 3 bytes of data located
prior to the address.

Inlined buckets are stored after their key in a page and since there is no
guarantee that the key will be of a length that is a multiple of 4, it is
possible for unaligned load/stores to occur when they are cast back to bucket
and page pointer types.

The fix adds a new field to track whether the current architecture exhibits this
issue, sets it on module load for ARM architectures, and then on bucket open, if
this field is set and the address is unaligned, a byte-by-byte copy of the
inlined bucket is performed.

Ref: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html
2016-07-28 14:25:49 +01:00
Ben Johnson
ad7482f549 Revert "Remove erroneous build constraint from arm64" 2016-01-19 17:40:29 -07:00
Alex Crawford
8fe5ed6b41 Remove erroneous build constraint from arm64
This was preventing ARM64 targets from building.
2016-01-19 15:15:53 -08:00
Qiang Huang
503413c015 Add support for arm64
Added build tag for arm64, so we won't get any errors on other
platforms with go 1.4.x.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-10-09 10:29:22 +08:00
Ben Johnson
a74efb5d16 revert arm64 change
This commit removes the arm64 change because it caused issues
with Go 1.4.

Fixes #416.
2015-09-09 15:16:17 -06:00
jefby
69f6bd2f78 add bolt_arm64.go for arm64
Signed-off-by: jefby <jef199006@gmail.com>
2015-09-08 10:48:40 +08:00