various: fix Scudo allocator due to LLVM update#444605
Conversation
The commit 01e8f57 unpinned the LLVM version, which led to building errors similar to this when Scudo is used: building the system configuration... error: builder for '/nix/store/1f9z73haq6avvv19glifalfnmpw3gsbx-malloc-provider-scudo.drv' failed with exit code 1; last 1 log lines: > cp: cannot stat '/nix/store/s43991isxhvknqmk53q7pqmkdrfvj1p4-compiler-rt-libc-19.1.7/lib/linux/libclang_rt.scudo-x86_64.so': No such file or directory For full logs, run: nix log /nix/store/1f9z73haq6avvv19glifalfnmpw3gsbx-malloc-provider-scudo.drv It seems in the new LLVM version the Scudo library was moved: $ ls /nix/store/*-compiler-rt-libc-20.1.8/lib/linux/libclang_rt.scudo* /nix/store/z98mwyi0w8f4kgk3rw6av946azh28hc9-compiler-rt-libc-20.1.8/lib/linux/libclang_rt.scudo_standalone_cxx-x86_64.a /nix/store/z98mwyi0w8f4kgk3rw6av946azh28hc9-compiler-rt-libc-20.1.8/lib/linux/libclang_rt.scudo_standalone-x86_64.a /nix/store/z98mwyi0w8f4kgk3rw6av946azh28hc9-compiler-rt-libc-20.1.8/lib/linux/libclang_rt.scudo_standalone-x86_64.so This commit adjusts the library path. Co-authored-by: CUB3D <callumthom11@gmail.com>
The commit 01e8f57 unpinned the LLVM version, which led to the following warnings whenever Scudo is loaded (basically whenever a command is started when used system-wide): Scudo WARNING: found 3 unrecognized flag(s): DeleteSizeMismatch=0:DeallocationTypeMismatch=0 DeallocationTypeMismatch=0 ZeroContents=1 According to the current Scudo documentation [1] the options are now spelled differently. This commit keeps all existing options and only updates the spelling. [1] https://llvm.org/docs/ScudoHardenedAllocator.html Reported-by: CUB3D <callumthom11@gmail.com>
emilazy
left a comment
There was a problem hiding this comment.
Thank you! Sorry for not checking more thoroughly on the unpin. It was pinned to a specific version to stop it using the _latest alias so I figured the default LLVM version would be fine, but didn't check for upstream churn.
|
This turned out to be a mass rebuild and should land in staging instead. |
|
Sorry about that, will re‐apply on |
|
Reapplied in #444670 to batch up the mass rebuild from the LLVM change. It should reach |
Thank you! I am not sure that the NixOS parts make a lot of sense on its own since it would still lead to runtime warnings all over the place. Best would be to merge everything together. |
The commit 01e8f57 unpinned the LLVM version of the Scudo allocator. When running with the hardened profile this led to building errors due to the changed path of the Scudo library and runtime errors due to changed spelling of the options.
This MR adjusts the library path (thanks to @CUB3D) and updates the spelling of all existing Scudo options according to the Scudo documentation [1]. For more details see the commit messages.
I built and tested these changes on my system with
imports = [(modulesPath + "/profiles/hardened.nix")];.Closes #437368
[1] https://llvm.org/docs/ScudoHardenedAllocator.html
@emilazy I hope it is fine to ping you for this MR.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.