aboutsummaryrefslogtreecommitdiff
path: root/doc/manual
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-07-19 18:52:46 +0000
committerGerrit Code Review <gerrit@localhost>2024-07-19 18:52:46 +0000
commit22252825c4ea5e8a60eea419ebe352cab184e8b6 (patch)
tree1f0a118a2c07a7b996814ba34b7fa8235fc4a879 /doc/manual
parentaba5f19680b2f4c29d7ce2ff5e2a89128c1cb26d (diff)
parent26e56780caaa3fe23bd1c7589c9ebde220381683 (diff)
Merge changes Id8b3d289,Ib75ab5b8,I3792eeb3 into main
* changes: Fixup a bunch of references to nixos.org manuals Add release notes for removing overflow from Nix language expr: fix a compiler warning about different signs in comparison
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/rl-next/ban-integer-overflow.md23
-rw-r--r--doc/manual/src/contributing/testing.md1
2 files changed, 23 insertions, 1 deletions
diff --git a/doc/manual/rl-next/ban-integer-overflow.md b/doc/manual/rl-next/ban-integer-overflow.md
new file mode 100644
index 000000000..d704db651
--- /dev/null
+++ b/doc/manual/rl-next/ban-integer-overflow.md
@@ -0,0 +1,23 @@
+---
+synopsis: Define integer overflow in the Nix language as an error
+issues: [fj#423]
+cls: [1594, 1595, 1597, 1609]
+category: Fixes
+credits: [jade]
+---
+
+Previously, integer overflow in the Nix language invoked C++ level signed overflow, which was undefined behaviour, but *probably* manifested as wrapping around on overflow.
+
+Since prior to the public release of Lix, Lix had C++ signed overflow defined to crash the process and nobody noticed this having accidentally removed overflow from the Nix language for three months until it was caught by fiddling around.
+Given the significant body of actual Nix code that has been evaluated by Lix in that time, it does not appear that nixpkgs or much of importance depends on integer overflow, so it is safe to turn into an error.
+
+Some other overflows were fixed:
+- `builtins.fromJSON` of values greater than the maximum representable value in a signed 64-bit integer will generate an error.
+- `nixConfig` in flakes will no longer accept negative values for configuration options.
+
+Integer overflow now looks like the following:
+
+```
+ยป nix eval --expr '9223372036854775807 + 1'
+error: integer overflow in adding 9223372036854775807 + 1
+```
diff --git a/doc/manual/src/contributing/testing.md b/doc/manual/src/contributing/testing.md
index b6b5318e0..cea6ee3bf 100644
--- a/doc/manual/src/contributing/testing.md
+++ b/doc/manual/src/contributing/testing.md
@@ -247,7 +247,6 @@ To ensure that characterization testing doesn't make it harder to intentionally
The integration tests are defined in the Nix flake under the `hydraJobs.tests` attribute.
These tests include everything that needs to interact with external services or run Lix in a non-trivial distributed setup.
-Because these tests are expensive and require more than what the standard github-actions setup provides, they only run on the master branch (on <https://hydra.nixos.org/jobset/nix/master>).
You can run them manually with `nix build .#hydraJobs.tests.{testName}` or `nix-build -A hydraJobs.tests.{testName}`