SIGILL in arithmetic code #445
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
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…
Add table
Add a link
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: