1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-10 02:51:02 +01:00
nix/src/libcmd
Sergei Zimmerman dce1a893d0
treewide: Remove toView() because it leads to segfaults when compiled with newer nixpkgs
Firstly, this is now available on darwin where the default in llvm 19.
Secondly, this leads to very weird segfaults when building with newer nixpkgs for some reason.
(It's UB after all).

This appears when building with the following:

mesonComponentOverrides = finalAttrs: prevAttrs: {
mesonBuildType = "debugoptimized";
dontStrip = true;
doCheck = false;
separateDebugInfo = false;
preConfigure = (prevAttrs.preConfigure or "") + ''
  case "$mesonBuildType" in
  release|minsize|debugoptimized) appendToVar mesonFlags "-Db_lto=true"  ;;
  *)                              appendToVar mesonFlags "-Db_lto=false" ;;
  esac
'';
};

And with the following nixpkgs input:

nix build ".#nix-cli" -L --override-input nixpkgs "https://releases.nixos.org/nixos/unstable/nixos-25.11pre870157.7df7ff7d8e00/nixexprs.tar.xz"

Stacktrace:

 #0  0x00000000006afdc0 in ?? ()
 #1  0x00007ffff71cebb6 in _Unwind_ForcedUnwind_Phase2 () from /nix/store/41ym1jm1b7j3rhglk82gwg9jml26z1km-gcc-14.3.0-lib/lib/libgcc_s.so.1
 #2  0x00007ffff71cf5b5 in _Unwind_Resume () from /nix/store/41ym1jm1b7j3rhglk82gwg9jml26z1km-gcc-14.3.0-lib/lib/libgcc_s.so.1
 #3  0x00007ffff7eac7d8 in std::basic_ios<char, std::char_traits<char> >::~basic_ios (this=<optimized out>, this=<optimized out>)
     at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/bits/basic_ios.h:286
 #4  std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream (this=<optimized out>, this=<optimized out>)
     at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/sstream:806
 #5  nix::SimpleLogger::logEI (this=<optimized out>, ei=...) at ../logging.cc:121
 #6  0x00007ffff7515794 in nix::Logger::logEI (this=0x675450, lvl=nix::lvlError, ei=...) at /nix/store/bkshji3nnxmrmgwa4n2kaxadajkwvn65-nix-util-2.32.0pre-dev/include/nix/util/logging.hh:144
 #7  nix::handleExceptions (programName=..., fun=...) at ../shared.cc:336
 #8  0x000000000047b76b in main (argc=<optimized out>, argv=<optimized out>) at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/bits/new_allocator.h:88
2025-10-05 02:30:21 +03:00
..
include/nix/cmd meson: Apply formatting universally 2025-08-07 02:58:29 +03:00
pch libcmd: Speed up builds by using precompiled headers 2025-07-20 22:01:59 +03:00
.version Package libnixmain and libnixcmd with Meson 2024-07-05 16:40:55 -04:00
built-path.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
command-installable-value.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
command.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
common-eval-args.cc No more globals.hh in headers 2025-08-20 16:24:37 -04:00
editor-for.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
installable-attr-path.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
installable-derived-path.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
installable-flake.cc libexpr: Statically allocate commonly used symbols 2025-08-31 13:24:06 +02:00
installable-value.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
installables.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
markdown.cc libcmd: Fix rendering of absolute URLs in markdown 2025-08-17 20:31:34 +03:00
meson.build treewide: Support builds with ASAN, enable in CI 2025-09-19 01:33:57 +03:00
meson.options meson: Apply formatting universally 2025-08-07 02:58:29 +03:00
misc-store-flags.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
network-proxy.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
package.nix flake: Apply nixfmt 1.0.0 2025-08-18 20:29:45 +03:00
repl-interacter.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
repl.cc treewide: Remove toView() because it leads to segfaults when compiled with newer nixpkgs 2025-10-05 02:30:21 +03:00