Segfault when comparing infinite data structures #330
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/language
Area/profiles
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#330
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
When comparing two infinitely nested data structures (and pointer equality doesn't suffice), Lix segfaults.
Steps To Reproduce
Causes Lix to segfault.
Expected behavior
If possible, define a result (I have no idea if there's a sensible argument to be made for either true or false, nor whether there's any way to efficiently determine this result). Otherwise, fail with a nice error instead of segfaulting.
nix --version
outputnix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab
Additional context
Inherited from Nix, present since at least 2022.
defining a result won't really be possible, but we should definitely limit recursion depth on comparisons (lix already does this for the evaluator itself, but comparisons themselves aren't subject to this yet). reusing the same stack depth limit we already have for eval should be fine, and give an obvious place to tune if anyfew run into this trapping.