From f40ff1737e829fb98a01951794eb1f3624cd3cad Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 20 Feb 2024 18:06:36 +0700 Subject: fix(tvix/eval): fix accidental recursion in printing errors There's some code path where fancy_format_str()->Error::Display, which recurses forever and overflows the stack. This was introduced in a previous commit today. Change-Id: I87a59492099f6c138c752478901b9aa614bb57cc Reviewed-on: https://cl.tvl.fyi/c/depot/+/10990 Reviewed-by: flokli Tested-by: BuildkiteCI Autosubmit: tazjin Reviewed-by: Peter Kolloch --- tvix/eval/src/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src') diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 06a60fbbb9..2627570211 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -514,7 +514,7 @@ to a missing value in the attribute set(s) included via `with`."#, impl Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.fancy_format_str()) + write!(f, "{}", self.kind) } } -- cgit 1.4.1