free(): invalid pointer
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.7k
- Forks
- 2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 80
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reducing the reported IFD case to a shareable snippet that reproduces the crash with nix-instantiate, noting whether the same .drv succeeds with nix-store --realize. Compare the invalid-pointer, segmentation-fault, and REPL cases; the work is done when the cause is identified and the reproducible invocation no longer aborts.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100