nix eval segmentation fault on long line (`nix eval nixpkgs#legacyPackages`)
Opened this issue · 1 comments
hraban commented
Describe the bug
Nix tool segfaults when printing a large set.
Steps to reproduce
$ nix eval nixpkgs#lispPackages_new.sbclPackages
Segmentation fault: 11
Another example:
$ nix repl
(import <nixpkgs> {}).lispPackages_new.sbclPackages
... outputs a lot, then:
Segmentation fault: 11
$
Same if I clone nixpkgs locally and do import ./. {}
, instead.
Expected behavior
A very very long output line.
Metadata
$ nix-env --version
nix-env (Nix) 2.9.1
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-darwin"`
- host os: `Darwin 21.6.0, macOS 10.16`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.9.1`
- channels(hraban): `""`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
Additional context
Originally posted to NixOS/nixpkgs#190092
hraban commented
Update:
Some segfaults persist, some are solved.
The title operation still causes a segfault:
$ nix eval nixpkgs#legacyPackages
Segmentation fault: 11
However, these do not cause segfaults anymore:
$ nix repl
> (import <nixpkgs> {}).lispPackages_new.sbclPackages
... long output but survives
> import <nixpkgs> {}
... again long output and survives
Version:
$ nix-env --version
nix-env (Nix) 2.12.0
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-darwin"`
- host os: `Darwin 21.6.0, macOS 10.16`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.12.0`
- channels(hraban): `"darwin"`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`