Skip to content

libstore: Fix dangling pointers in DerivationGoal constructors#13761

Merged
xokdvium merged 1 commit intoNixOS:masterfrom
xokdvium:fix-dangling-pointers
Aug 15, 2025
Merged

libstore: Fix dangling pointers in DerivationGoal constructors#13761
xokdvium merged 1 commit intoNixOS:masterfrom
xokdvium:fix-dangling-pointers

Conversation

@xokdvium
Copy link
Copy Markdown
Contributor

Motivation

This leads to a use-after free, because staticOutputHashes returns a temporary object that dies before we can do a return *mOutputHash.

Context

This is most likely the cause for random failures in Hydra 1.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

This leads to a use-after free, because staticOutputHashes returns a temporary
object that dies before we can do a `return *mOutputHash`.

This is most likely the cause for random failures in Hydra [1].

[1]: https://hydra.nixos.org/build/305091330/nixlog/2
@xokdvium xokdvium requested a review from Ericson2314 as a code owner August 15, 2025 13:40
@xokdvium xokdvium enabled auto-merge August 15, 2025 13:43
@xokdvium xokdvium merged commit c736db5 into NixOS:master Aug 15, 2025
12 checks passed
@xokdvium xokdvium deleted the fix-dangling-pointers branch August 15, 2025 14:06
@Ericson2314
Copy link
Copy Markdown
Member

Thank you!!!

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.

3 participants