Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix insufficent attribute capacity in user profile #4411

Merged
merged 1 commit into from Dec 30, 2020

Conversation

corngood
Copy link
Contributor

I recently started to get assert failures in nix-env for certain packages:

$ nix-env -i mercurial
warning: there are multiple derivations named 'mercurial-5.6'; using the first one
installing 'mercurial-5.6'
nix-env: src/libexpr/attr-set.hh:54: void nix::Bindings::push_back(const nix::Attr&): Assertion `size_ < capacity_' failed.

In this case, the package has 17 meta attributes:

src/nix-env/user-env.cc:93
93              for (auto & j : metaNames) {
1: metaNames = std::set with 17 elements = {[0] = "available", [1] = "broken", [2] = "description", [3] = "downloadPage", [4] = "homepage",
  [5] = "insecure", [6] = "isBuildPythonPackage", [7] = "license", [8] = "maintainers", [9] = "name", [10] = "outputsToInstall", [11] = "platforms",
  [12] = "position", [13] = "unfree", [14] = "unsupported", [15] = "updateWalker", [16] = "version"}

This is my attempt to fix it by calculating the capacities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants