1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

Revert "Merge pull request #13938 from NixOS/import-thunk"

This has multiple dangling pointer issues that lead to segfaults in e.g.:

nix eval --expr '(builtins.getFlake "github:nixos/nixpkgs/25.05")' --impure

This reverts commit ad175727e4, reversing
changes made to d314750174.
This commit is contained in:
Sergei Zimmerman 2025-09-18 01:52:46 +03:00
parent b4fcb64276
commit fd034814dc
No known key found for this signature in database
9 changed files with 91 additions and 138 deletions

View file

@ -95,7 +95,9 @@ std::optional<struct stat> PosixSourceAccessor::cachedLstat(const CanonPath & pa
// former is not hashable on libc++.
Path absPath = makeAbsPath(path).string();
if (auto res = getConcurrent(cache, absPath))
std::optional<Cache::mapped_type> res;
cache.cvisit(absPath, [&](auto & x) { res.emplace(x.second); });
if (res)
return *res;
auto st = nix::maybeLstat(absPath.c_str());