1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-28 13:11:00 +01:00

Merge pull request #14664 from NixOS/fix-i686-asan

libstore: Align LocalFSStore to 8 bytes even on i686-linux
This commit is contained in:
John Ericson 2025-11-27 04:26:08 +00:00 committed by GitHub
commit a3d77a4bf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View file

@ -65,7 +65,9 @@ struct BinaryCacheStoreConfig : virtual StoreConfig
* @note subclasses must implement at least one of the two
* virtual getFile() methods.
*/
struct BinaryCacheStore : virtual Store, virtual LogStore
struct alignas(8) /* Work around ASAN failures on i686-linux. */
BinaryCacheStore : virtual Store,
virtual LogStore
{
using Config = BinaryCacheStoreConfig;

View file

@ -66,7 +66,10 @@ public:
this, rootDir.get() ? *rootDir.get() + "/nix/store" : storeDir, "real", "Physical path of the Nix store."};
};
struct LocalFSStore : virtual Store, virtual GcStore, virtual LogStore
struct alignas(8) /* Work around ASAN failures on i686-linux. */
LocalFSStore : virtual Store,
virtual GcStore,
virtual LogStore
{
using Config = LocalFSStoreConfig;

View file

@ -37,7 +37,8 @@ StoreReference SSHStoreConfig::getReference() const
};
}
struct SSHStore : virtual RemoteStore
struct alignas(8) /* Work around ASAN failures on i686-linux. */
SSHStore : virtual RemoteStore
{
using Config = SSHStoreConfig;