1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00
Commit graph

21222 commits

Author SHA1 Message Date
Farid Zakaria
5a13f9fc91 shellcheck fix: tests/functional/logging.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
c4da98c8f4 shellcheck fix: tests/functional/linux-sandbox.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
5341d82428 shellcheck fix: tests/functional/legacy-ssh-store.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
f702101224 shellcheck fix: tests/functional/install-darwin.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
78d9a8d92b shellcheck fix: tests/functional/impure-eval.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
1cd96f22c0 shellcheck fix: tests/functional/impure-derivations.sh 2025-09-29 10:52:17 -07:00
Farid Zakaria
f3a2876c3a shellcheck fix: tests/functional/hash-convert.sh 2025-09-29 10:52:16 -07:00
Farid Zakaria
52b9fb38e0 shellcheck fix: tests/functional/gc-non-blocking.sh 2025-09-29 09:23:41 -07:00
Farid Zakaria
2e5952fb6a shellcheck fix: tests/functional/gc-concurrent2.builder.sh 2025-09-29 09:22:45 -07:00
Farid Zakaria
75df03204b shellcheck fix: tests/functional/gc-concurrent.sh 2025-09-29 09:21:47 -07:00
Farid Zakaria
613bd67574 shellcheck fix: tests/functional/gc-concurrent.builder.sh 2025-09-29 09:20:02 -07:00
Farid Zakaria
4192ca9131 shellcheck fix: tests/functional/gc-auto.sh 2025-09-29 09:18:50 -07:00
Farid Zakaria
08a82f4682 shellcheck fix: tests/functional/formatter.simple.sh 2025-09-29 09:17:24 -07:00
Farid Zakaria
f596c9b8c3 shellcheck fix: tests/functional/flakes/show.sh 2025-09-29 09:16:29 -07:00
Farid Zakaria
cb22518754 shellcheck fix: tests/functional/flakes/run.sh 2025-09-29 09:15:11 -07:00
Farid Zakaria
020f67a653 shellcheck fix: tests/functional/flakes/prefetch.sh 2025-09-29 09:14:41 -07:00
Jörg Thalheim
b6f4788a8f
Merge pull request #14110 from Mic92/ptsname
Fix thread-safety issue with ptsname() usage
2025-09-29 13:49:58 +02:00
Jörg Thalheim
f816b9bcb8
Merge pull request #14111 from Mic92/symlinks
Prevent infinite symlink loop in followLinksToStore()
2025-09-29 13:49:19 +02:00
Jörg Thalheim
5ec9138179 Prevent infinite symlink loop in followLinksToStore()
The followLinksToStore() function could hang indefinitely when encountering
symlink cycles outside the Nix store, causing 100% CPU usage and blocking
any operations that use this function.

This affects multiple commands including nix-store --query, --delete,
--verify, nix-env, and nix-copy-closure when given paths with symlink cycles.

The fix adds a maximum limit of 1024 symlink follows (matching the limit
used by canonPath) and throws an error when exceeded, preventing the
infinite loop while preserving the original semantics of stopping at
the first path inside the store.
2025-09-29 12:22:43 +02:00
Jörg Thalheim
a9ffa42dda Fix thread-safety issue with ptsname() usage
Replace non-thread-safe ptsname() calls with a new getPtsName() helper
function that:
- Uses thread-safe ptsname_r() on Linux/BSD platforms
- Uses mutex-protected ptsname() on macOS (which lacks ptsname_r())
2025-09-29 12:01:49 +02:00
Eelco Dolstra
b0431a76f5
Merge pull request #14058 from DeterminateSystems/upstream-RossComputerGuy/feat/expose-logfmt
C API: add log format and verbosity functions
2025-09-29 11:21:43 +02:00
Jörg Thalheim
5e65fa7069
Merge pull request #14109 from Mic92/mingw
fix mingw build
2025-09-29 10:57:43 +02:00
Jörg Thalheim
69eae7770a fix mingw build 2025-09-29 10:29:37 +02:00
Jörg Thalheim
738d141dd9
Merge pull request #14108 from fzakaria/fzakaria/shellcheck-multiple-3
shellcheck fixes for tests/functional/local-overlay-store
2025-09-29 09:58:07 +02:00
Jörg Thalheim
7cbc0f97e7
Merge pull request #14090 from Radvendii/expr-slim
nixexpr: introduce arena to hold ExprString strings
2025-09-29 08:33:10 +02:00
Jörg Thalheim
c5b3567512
Merge pull request #14105 from xokdvium/cpp-bison
libexpr: Switch parser.y to %skeleton lalr1.cc
2025-09-29 08:23:03 +02:00
Farid Zakaria
f394390492 shellcheck fix: tests/functional/local-overlay-store/add-lower-inner.sh 2025-09-28 20:40:08 -07:00
Farid Zakaria
8f0d9412ba shellcheck fix: tests/functional/local-overlay-store/bad-uris.sh 2025-09-28 20:39:40 -07:00
Farid Zakaria
8f14301533 shellcheck fix: tests/functional/local-overlay-store/build-inner.sh 2025-09-28 20:38:46 -07:00
Farid Zakaria
6cae8da29d shellcheck fix: tests/functional/local-overlay-store/check-post-init.sh 2025-09-28 20:37:23 -07:00
Farid Zakaria
bb97f4b07a shellcheck fix: tests/functional/local-overlay-store/common.sh 2025-09-28 20:35:47 -07:00
Farid Zakaria
20665e1c3d shellcheck fix: tests/functional/local-overlay-store/delete-duplicate-inner.sh 2025-09-28 20:32:49 -07:00
Farid Zakaria
326d626ad7 shellcheck fix: tests/functional/local-overlay-store/delete-refs-inner.sh 2025-09-28 20:32:12 -07:00
Farid Zakaria
62b36eba11 shellcheck fix: tests/functional/local-overlay-store/gc-inner.sh 2025-09-28 20:31:09 -07:00
Farid Zakaria
675179a510 shellcheck fix: tests/functional/local-overlay-store/gc.sh 2025-09-28 20:30:02 -07:00
Farid Zakaria
283a9c4c5a shellcheck fix: tests/functional/local-overlay-store/optimise-inner.sh 2025-09-28 20:29:35 -07:00
Farid Zakaria
dbb53de9d3 shellcheck fix: tests/functional/local-overlay-store/redundant-add.sh 2025-09-28 20:28:18 -07:00
Farid Zakaria
0c50d5b25a shellcheck fix: tests/functional/local-overlay-store/redundant-add-inner.sh 2025-09-28 20:27:21 -07:00
Farid Zakaria
1bee4d0988 shellcheck fix: tests/functional/local-overlay-store/redundant-add.sh 2025-09-28 20:25:42 -07:00
Farid Zakaria
4ef4e96788 shellcheck fix: tests/functional/local-overlay-store/remount.sh 2025-09-28 20:25:09 -07:00
Farid Zakaria
c4c95f3d39 shellcheck fix: tests/functional/local-overlay-store/stale-file-handle-inner.sh 2025-09-28 20:24:38 -07:00
Farid Zakaria
e896bf1cb1 shellcheck fix: tests/functional/local-overlay-store/stale-file-handle.sh 2025-09-28 20:24:09 -07:00
Farid Zakaria
3a1ba8e41e shellcheck fix: tests/functional/local-overlay-store/verify-inner.sh 2025-09-28 20:23:19 -07:00
Farid Zakaria
76c9d3885c shellcheck fix: tests/functional/local-overlay-store/verify.sh 2025-09-28 20:22:55 -07:00
John Ericson
676e885f8d
Merge pull request #14084 from obsidiansystems/issue-13247-test
Create test for Issue 13247
2025-09-28 19:12:44 -04:00
Sergei Zimmerman
c1f805b856
packaging: Build without symbolic interposition on GCC
This turns out to be a big problem for performance of Bison
generated code, that for whatever reason cannot be made internal
to the shared library. This causes GCC to make a bunch of function
calls go through PLT. Ideally these hot functions (like move/copy ctor) could become
inline in upstream Bison. That will make sure that GCC can do interprocedular
optimizations without -fno-semantic-interposition [^]. Considering that
LLVM already does inlining and whatnot is a good motivation for this change.
I don't know of any case where Nix relies on LD_PRELOAD tricks for the shared
libraries in production use-cases.

[^]: https://maskray.me/blog/2021-05-09-fno-semantic-interposition
2025-09-29 01:46:40 +03:00
Sergei Zimmerman
a8715a2d6e
libexpr: Switch parser.y to %skeleton lalr1.cc
Since the parser is now LALR we can easily switch
over to the less ugly sketelon than the default C one.
This would allow us to switch from %union to %define api.value.type variant
in the future to avoid the need for triviall POD types.
2025-09-29 00:58:41 +03:00
John Ericson
241c7cd1f9
Merge pull request #14104 from xokdvium/dead-code-location
libexpr: Remove unused members from ParserLocation
2025-09-28 16:46:50 -04:00
Sergei Zimmerman
0f08feaa58
libexpr: Remove unused members from ParserLocation 2025-09-28 22:57:11 +03:00
Taeer Bar-Yam
eab467ecfb libexpr: introduce arena to hold ExprString strings
1. Saves 24-32 bytes per string (size of std::string)
2. Saves additional bytes by not over-allocating strings (in total we
save ~1% memory)
3. Sets us up to perform a similar transformation on the other Expr
subclasses
4. Makes ExprString trivially moveable (before the string data might
move, causing the Value's pointer to become invalid). This is important
so we can put ExprStrings in an std::vector and refer to them by index

We have introduced a string copy in ParserState::stripIndentation().
This could be removed by pre-allocating the right sized string in the
arena, but this adds complexity and doesn't seem to improve performance,
so for now we've left the copy in.
2025-09-28 14:23:13 -04:00