mirror of
https://github.com/rclone/rclone.git
synced 2025-03-05 03:09:39 +08:00

`FS.cacheExpiry` is accessed through sync/atomic. According to the documentation, "On ARM, 386, 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." Before commit 1d2fe0d8564bc679ece166c24b24e6fe7dc1455c this field was aligned, but then a new field was added to the structure, causing the test suite to panic on linux/386. No other field is used with sync/atomic, so `cacheExpiry` can just be placed at the beginning of the stuct to ensure it is always aligned.