about summary refs log tree commit diff
path: root/users/tazjin/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-19T12·50+0100
committertazjin <mail@tazj.in>2020-07-10T22·25+0000
commit5e2151b521b9b8957ab8b53f092a089e6858a2b7 (patch)
tree40bc4dbf10f2138b3a429e581c2911b871cac4f6 /users/tazjin/nixos
parent1937bc86244c0d420f7b40eeb38f14827e92d162 (diff)
fix(3p/nix/repl): Scan NixRepl for GC roots r/1250
Backport of https://github.com/NixOS/nix/commit/b244e65cdbc2949af70bd539bf8f3bd2fa952d07

Fixes https://github.com/NixOS/nix/issues/3175

------

Original fault description by puck:

I suspect I found the issue: The Nix Command structs are stored on the
heap (using ref<T>, a wrapper around std::shared_ptr<T>), which means
that any pointers that the NixRepl struct contains are eligible to be
reaped by the GC. This includes, but is not limited to, the Env
pointer, which seems to cause most of the random segfaults, or random
other values in the environment, which seems to be what @arianvp
experienced too.

Change-Id: I376d7cfd432daaa6f1fbbf77788ff048082f34e5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1001
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/tazjin/nixos')
0 files changed, 0 insertions, 0 deletions