1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00
nix/src/libstore
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
..
build Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
builtins lib{store,fetchers}: Pass URLs specified directly verbatim to FileTransferRequest 2025-09-01 02:22:23 +03:00
include/nix/store build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
linux Merge pull request #13490 from Mic92/clang-tidy-simple-warnings 2025-08-11 18:21:46 +02:00
pch libstore: Speed up builds by using precompiled headers 2025-07-20 22:01:53 +03:00
unix Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
windows meson: Apply formatting universally 2025-08-07 02:58:29 +03:00
.version Build nix-store with Meson 2024-06-14 10:25:14 -04:00
aws-creds.cc build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
binary-cache-store.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
build-result.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
ca-specific-schema.sql Rename to "content-address*ing* derivation" 2025-02-10 01:12:56 -05:00
common-protocol.cc Convert Realisation JSON logic to standard style 2025-09-22 12:59:37 -04:00
common-ssh-store-config.cc Add user@address:port support 2025-08-06 23:48:14 +03:00
content-address.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
daemon.cc treewide: Remove toView() because it leads to segfaults when compiled with newer nixpkgs 2025-10-05 02:30:21 +03:00
derivation-options.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
derivations.cc Minimize the use of C Macros for characterization tests 2025-09-28 09:54:46 -04:00
derived-path-map.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
derived-path.cc Modernize and test derived path JSON 2025-09-23 15:05:56 -04:00
downstream-placeholder.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
dummy-store.cc Implement realisation operations on dummy store 2025-10-01 17:05:06 -04:00
dummy-store.md libstore: Fix typo in description of dummy store 2025-09-21 13:19:49 +03:00
export-import.cc Move exportPaths() / importPaths() out of the Store class 2025-09-10 14:22:46 +02:00
filetransfer.cc curlFileTransfer::workerThreadEntry Only call quit if we need to. 2025-09-29 18:10:34 -04:00
gc.cc libstore: Include missing header to fix compile with libc++ 20 2025-10-01 22:19:08 +03:00
globals.cc Make Settings::sandboxPaths well-typed 2025-08-20 16:24:37 -04:00
http-binary-cache-store.cc feat(libstore/http-binary-cache-store): narinfo/ls/log compression 2025-09-29 21:53:40 +00:00
http-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
indirect-root-store.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
keys.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
legacy-ssh-store.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
legacy-ssh-store.md Add user@address:port support 2025-08-06 23:48:14 +03:00
local-binary-cache-store.cc Rewrite StoreConfig::getUri in terms of new StoreConfig::getReference 2025-08-13 19:06:59 -04:00
local-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
local-fs-store.cc libstore: Deduplicate LocalFSStoreConfig::rootDir initializers 2025-09-28 18:38:57 +03:00
local-overlay-store.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
local-overlay-store.md docs: Fix miscellaneous typos and formatting issues 2025-05-13 22:20:11 +00:00
local-store.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
local-store.md Build the local store on Windows 2024-05-10 13:05:23 -04:00
log-store.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
machines.cc Clean up Base* code 2025-08-06 11:51:44 -04:00
make-content-addressed.cc ValidPathInfo, NarInfo, turn funky constructor into static method 2025-09-13 13:17:14 -04:00
meson.build build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
meson.options build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
misc.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
mounted-ssh-store.md MountedSSHStore: stores on shared filesystems 2023-11-21 13:34:01 -05:00
names.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
nar-accessor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
nar-info-disk-cache.cc Convert Realisation JSON logic to standard style 2025-09-22 12:59:37 -04:00
nar-info.cc Make a few more things use StoreDirConfig instead of Store 2025-08-15 15:35:51 -04:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
optimise-store.cc libutil: Make HashResult a proper struct 2025-08-08 02:06:14 +03:00
outputs-spec.cc Fix JSON_IMPL macro to avoid extraneous copies 2025-09-23 13:05:12 -04:00
package.nix build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
parsed-derivations.cc Deduplicate "export reference graph" logic a bit 2025-08-20 16:54:17 -04:00
path-info.cc ValidPathInfo, NarInfo, turn funky constructor into static method 2025-09-13 13:17:14 -04:00
path-references.cc libstore: Remove unused overload of scanForReferences 2025-08-08 10:30:07 +03:00
path-with-outputs.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
path.cc Fix JSON_IMPL macro to avoid extraneous copies 2025-09-23 13:05:12 -04:00
pathlocks.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
posix-fs-canonicalise.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
profiles.cc No more globals.hh in headers 2025-08-20 16:24:37 -04:00
realisation.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
references.cc libutil: Move references.{hh,cc} to libstore 2025-08-08 10:30:09 +03:00
remote-fs-accessor.cc Create a second Store::getFSAccessor for a single store object 2025-09-24 15:49:14 -04:00
remote-store.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
restricted-store.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
s3-binary-cache-store.cc libstore: Make all StoreConfig::getReference implementations return store parameters 2025-09-28 16:29:12 +03:00
s3-binary-cache-store.md fix location 2024-09-27 11:07:04 +02:00
s3-url.cc build(libstore): add NIX_WITH_CURL_S3 build option 2025-10-03 03:34:57 +00:00
schema.sql Build the local store on Windows 2024-05-10 13:05:23 -04:00
serve-protocol-connection.cc Remove support for serve protocol < 5 2025-09-10 10:57:15 +02:00
serve-protocol.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00
sqlite.cc SQLite: fsync db.sqlite-shm before opening the database 2025-08-26 00:42:18 +03:00
ssh-store.cc Create a second Store::getFSAccessor for a single store object 2025-09-24 15:49:14 -04:00
ssh-store.md Add user@address:port support 2025-08-06 23:48:14 +03:00
ssh.cc libstore: fixup fakeSSH check 2025-10-03 12:17:17 -07:00
store-api.cc Split out UnkeyedRealisation from Realisation 2025-10-01 17:01:26 -04:00
store-dir-config.cc Simplify "Store dir" superclass 2025-08-15 14:12:37 -04:00
store-reference.cc libstore: Reallow unbracketed IPv6 addresses in store references 2025-09-09 00:41:03 +03:00
store-registration.cc No more globals.hh in headers 2025-08-20 16:24:37 -04:00
uds-remote-store.cc libstore: Make all StoreConfig::getReference implementations return store parameters 2025-09-28 16:29:12 +03:00
uds-remote-store.md Enable the unix:// store on Windows 2024-04-18 16:58:32 -04:00
worker-protocol-connection.cc Remove WorkerProto::Op::ImportPaths 2025-09-09 15:41:17 +02:00
worker-protocol.cc Use std::variant to enforce BuildResult invariants 2025-09-27 15:56:06 -04:00