From 4ab728b3a2182cfed884de083284cc51673a6085 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 4 Nov 2022 09:57:47 -0700 Subject: [PATCH] Reduce FISH_MAX_EVAL_DEPTH under tsan The stack overflow tests are too slow without this. This is because the tests are essentially quadratic: with 500 jobs, and each job attempts to reap all jobs. --- src/parse_constants.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parse_constants.h b/src/parse_constants.h index 82280e57d..f228e90b3 100644 --- a/src/parse_constants.h +++ b/src/parse_constants.h @@ -217,14 +217,19 @@ enum class pipeline_position_t : uint8_t { #define FISH_MAX_STACK_DEPTH 128 /// Maximum number of nested string substitutions (in lieu of evals) +/// Reduced under TSAN: our CI test creates 500 jobs and this is very slow with TSAN. +#if FISH_TSAN_WORKAROUNDS +#define FISH_MAX_EVAL_DEPTH 250 +#else #define FISH_MAX_EVAL_DEPTH 500 +#endif /// Error message on a function that calls itself immediately. #define INFINITE_FUNC_RECURSION_ERR_MSG \ _(L"The function '%ls' calls itself immediately, which would result in an infinite loop.") /// Error message on reaching maximum call stack depth. -#define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG \ +#define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG \ _(L"The call stack limit has been exceeded. Do you have an accidental infinite loop?") /// Error message when encountering an unknown builtin name.