syncthing/lib
Aurélien Rainone f1a7dd766e all: Add comment to ensure correct atomics alignment (fixes #5813)
Per the sync/atomic bug note:

> On ARM, x86-32, and 32-bit MIPS, it is the caller's
> responsibility to arrange for 64-bit alignment of 64-bit words
> accessed atomically. The first word in a variable or in an
> allocated struct, array, or slice can be relied upon to be
> 64-bit aligned.

All atomic accesses of 64-bit variables in syncthing code base are
currently ok (i.e they are all 64-bit aligned).

Generally, the bug is triggered because of incorrect alignement
of struct fields. Free variables (declared in a function) are
guaranteed to be 64-bit aligned by the Go compiler.

To ensure the code remains correct upon further addition/removal
of fields, which would change the currently correct alignment, I
added the following comment where required:

     // atomic, must remain 64-bit aligned

See https://golang.org/pkg/sync/atomic/#pkg-note-BUG.
2019-07-13 14:05:39 +01:00
..
api lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02:00
beacon lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
build lib/build: Version 1.2 will be the Fermium Flea 2019-06-06 14:45:07 +02:00
config lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
connections lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
db lib/db, lib/model: Remove folder info from panics (ref #5839) (#5840) 2019-07-10 10:57:49 +02:00
dialer all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
discover lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
events all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
fs lib/fs: Enhance mtimefs, use everywhere (fixes #5777) (#5776) 2019-06-11 08:27:12 +02:00
ignore lib/ignore: Additional test case (#5672) 2019-04-28 21:20:11 +01:00
locations all: Use new reflect based CLI (#5487) 2019-02-12 07:58:24 +01:00
logger all: Get rid of fatal logging (#5537) 2019-02-14 20:29:14 +00:00
model lib/model: Fix integer conversion (fixes #5837) (#5851) 2019-07-12 16:37:12 +02:00
nat all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
osutil lib/versioner: Restore for all versioners, cross-device support (#5514) 2019-04-28 23:30:16 +01:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Add comment to ensure correct atomics alignment (fixes #5813) 2019-07-13 14:05:39 +01:00
rand lib/connections: Add QUIC protocol support (fixes #5377) (#5737) 2019-05-29 09:56:40 +02:00
rc all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
relay lib/relay: Call the proper Error method (ref #5806) (#5841) 2019-07-09 22:29:19 +01:00
scanner all: Add comment to ensure correct atomics alignment (fixes #5813) 2019-07-13 14:05:39 +01:00
sha256 all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats lib/db: Refactor: use a Lowlevel type underneath Instance (ref #5198) (#5212) 2018-10-10 11:34:24 +02:00
stun all: Add comment to ensure correct atomics alignment (fixes #5813) 2019-07-13 14:05:39 +01:00
sync all: Even more boring linter fixes (#5501) 2019-02-02 11:45:17 +01:00
testutils lib/model, lib/testutils: Test closing a connection on folder restart (#5707) 2019-05-18 08:53:59 +02:00
tlsutil lib/tlsutil: Enable TLS 1.3 when available, on test builds (fixes #5065) (#5558) 2019-02-26 11:49:02 +01:00
upgrade all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
upnp lib/upnp: Don’t log unknown device types (fixes #5038) (#5087) 2018-07-30 16:34:35 +02:00
ur lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
util lib: Add util.Service as suture.Service template (fixes #5801) (#5806) 2019-07-09 11:40:30 +02:00
versioner lib/versioner: Replace multiple placeholders in a single token in external command (fixes #5849) 2019-07-12 08:45:39 +01:00
watchaggregator all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
weakhash lib/scanner: Use standard adler32 when we don't need rolling (#5556) 2019-02-25 13:29:31 +04:00