Skip to content

Commit 0a86df1

Browse files
committed
builtins.hashString: Devirtualize lazy paths
Fixes https://github.com/DeterminateSystems/determinate/issues/160.
1 parent 3027418 commit 0a86df1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/libexpr/primops.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4729,8 +4729,9 @@ static void prim_hashString(EvalState & state, const PosIdx pos, Value ** args,
47294729
state.error<EvalError>("unknown hash algorithm '%1%'", algo).atPos(pos).debugThrow();
47304730

47314731
NixStringContext context; // discarded
4732-
auto s =
4733-
state.forceString(*args[1], context, pos, "while evaluating the second argument passed to builtins.hashString");
4732+
auto s = state.devirtualize(
4733+
state.forceString(*args[1], context, pos, "while evaluating the second argument passed to builtins.hashString"),
4734+
context);
47344735

47354736
v.mkString(hashString(*ha, s).to_string(HashFormat::Base16, false), state.mem);
47364737
}

0 commit comments

Comments
 (0)