From dbfe6318b3a38294c27546a1d454767092f5346e Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Sun, 23 Nov 2025 00:05:34 +0100 Subject: [PATCH] libexpr: move ExprCall storage to the arena --- src/libexpr/nixexpr.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 34d286f4e..37e22c466 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -486,6 +486,12 @@ void ExprLambda::bindVars(EvalState & es, const std::shared_ptr void ExprCall::bindVars(EvalState & es, const std::shared_ptr & env) { + // Move storage into the Exprs arena + { + auto arena = es.mem.exprs.alloc; + std::pmr::vector newArgs{std::move(*args), arena}; + args.emplace(std::move(newArgs), arena); + } if (es.debugRepl) es.exprEnvs.insert(std::make_pair(this, env));