SIGILL in arithmetic code #445
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#445
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Lix crashes with SIGILL when evaluating certain expressions.
dmesg message:
Coredump stack trace: https://pb.ltn.pw/M9ivd3mz
Steps To Reproduce
net.nix
nix-instantiate --eval -E 'with import <nixpkgs> { }; let net = callPackage ./net.nix {}; in net.lib.net.cidr.host 123 "fe80::/10"'
Expected behavior
It should evaluate instead of crashing. Evaluation result on Nix 2.18.4:
"fe80::7b"
nix --version
outputAdditional context
Add any other context about the problem here.
duplicate of this, but, wtf, nixpkgs should not be relying on overflow semantics, especially given our integers are signed.
#423
@janik i believe this is your code
Hey, I have been working on
lib.network
which should be unrelated https://github.com/NixOS/nixpkgs/pull/318712The issue above is talking about a gist, that isn't related to nixpkgs afaict, in nixpkgs we are using a toml parsing hack to convert from base10 to base16.
anyway. we're closing this as duplicate and we would additionally argue that the code doing the overflow is broken, itself, because stuff overflowing an i64 is itself not usually a sign of correctness.
the nixpkgs lib stuff that janik wrote may be a suitable replacement for this gist.
This issue was mentioned on Gerrit on the following CLs: