Merge pull request #14624 from roberth/deepSeq-stack-overflow

Fix most remaining stack overflows
This commit is contained in:
Sergei Zimmerman
2026-01-02 14:53:07 +00:00
committed by GitHub
13 changed files with 101 additions and 15 deletions

View File

@@ -2408,6 +2408,8 @@ BackedStringView EvalState::coerceToString(
bool copyToStore,
bool canonicalizePath)
{
auto _level = addCallDepth(pos);
forceValue(v, pos);
if (v.type() == nString) {
@@ -2627,6 +2629,8 @@ SingleDerivedPath EvalState::coerceToSingleDerivedPath(const PosIdx pos, Value &
// `assert a == b; x` are critical for our users' testing UX.
void EvalState::assertEqValues(Value & v1, Value & v2, const PosIdx pos, std::string_view errorCtx)
{
auto _level = addCallDepth(pos);
// This implementation must match eqValues.
forceValue(v1, pos);
forceValue(v2, pos);
@@ -2833,6 +2837,8 @@ void EvalState::assertEqValues(Value & v1, Value & v2, const PosIdx pos, std::st
// This implementation must match assertEqValues
bool EvalState::eqValues(Value & v1, Value & v2, const PosIdx pos, std::string_view errorCtx)
{
auto _level = addCallDepth(pos);
forceValue(v1, pos);
forceValue(v2, pos);