Skip to content

Stack overflow detection is broken except on x86_64-linux #8281

@roberth

Description

@roberth

Describe the bug

nix-repl> :p let a = _: { a = a a; }; in a {}
{ a = { a = ..... { a = zsh: segmentation fault

Steps To Reproduce

Try the above in nix repl but not on x86_64-linux where it works.

If you don't want to have the printing code involved in the overflow, do something with seq for example.

Expected behavior

nix-env --version output

2.16.0pre20230428_89d3cc5

x86_64-darwin, aarch64-darwin, aarch64-linux

Additional context

Workaround: when nix crashes on mac, try evaluating the same thing on linux. You might learn that it is indeed a stack overflow, ruling out another kind of bug with a fairly high degree of certainty.
However, even in this case, it's not very actionable because of the

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugerror-messagesConfusing messages and better diagnosticslanguageThe Nix expression language; parser, interpreter, primops, evaluation, etc
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions