Skip to content

free(): invalid pointer #3973

@nmattia

Description

@nmattia

Describe the bug

I'm getting a core dump when running nix-instantiate:

$ nix-instantiate foo.nix -A some.attribute
free(): invalid pointer
Aborted (core dumped)

Unfortunately I can't share the code, but it seems to be happening when running a derivation that's then imported (IFD) but I'm not sure if that actually matters. -vv doesn't show anything suspicious. nix-store --realizeing the .drv works fine so I guess the problem is not in the drv's build.

After tweaking the Nix code a bit, I get a few more errors:

$ nix-instantiate foo.nix -A some-attribute
munmap_chunk(): invalid pointer
Aborted (core dumped)

and sometimes

Segmentation fault (core dumped)

(got that one in the repl)

Happy to share as much info as I can, I'll try to boil it down to a snippet I can share.

$ nix --version
nix (Nix) 2.4pre20200721_ff314f1

I'll try to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions