diff options
author | Vladimír Čunát <v@cunat.cz> | 2022-01-18 17:39:33 +0100 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2022-01-18 17:39:33 +0100 |
commit | 24bb158cf085c224315be94895b72833280ba5f5 (patch) | |
tree | c4b6ef576c7885b4c1fcb8204b093fb436998b51 /nixos/modules/config | |
parent | 21115ea8f90fce9d20caa0fdf91d4558c6ca935d (diff) | |
parent | 9ac11c07628c1a35b4a47ae4f76372f131d04c75 (diff) | |
download | nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar.gz nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar.bz2 nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar.lz nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar.xz nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.tar.zst nixpkgs-24bb158cf085c224315be94895b72833280ba5f5.zip |
Merge #143715: nixos/malloc: fix scudo on aarch64-linux
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/malloc.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index 84da5643004..a3fed33afa1 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -22,8 +22,15 @@ let ''; }; - scudo = { - libPath = "${pkgs.llvmPackages_latest.compiler-rt}/lib/linux/libclang_rt.scudo-x86_64.so"; + scudo = let + platformMap = { + aarch64-linux = "aarch64"; + x86_64-linux = "x86_64"; + }; + + systemPlatform = platformMap.${pkgs.stdenv.hostPlatform.system} or (throw "scudo not supported on ${pkgs.stdenv.hostPlatform.system}"); + in { + libPath = "${pkgs.llvmPackages_latest.compiler-rt}/lib/linux/libclang_rt.scudo-${systemPlatform}.so"; description = '' A user-mode allocator based on LLVM Sanitizer’s CombinedAllocator, which aims at providing additional mitigations against heap based |