From e026439a3652e579baddf4027213db89b23884fa Mon Sep 17 00:00:00 2001 From: Justin King Date: Wed, 14 Oct 2026 16:12:57 -0700 Subject: [PATCH] Fix bug in optimized regex matching step PiperOrigin-RevId: 999692402 --- eval/eval/regex_match_step.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eval/eval/regex_match_step.cc b/eval/eval/regex_match_step.cc index 3c949ee9f..4df758e76 100644 --- a/eval/eval/regex_match_step.cc +++ b/eval/eval/regex_match_step.cc @@ -66,6 +66,10 @@ class RegexMatchStep final : public ExpressionStepBase { } auto input_args = frame->value_stack().GetSpan(kNumRegexMatchArguments); const auto& subject = input_args[kRegexMatchStepSubject]; + if (subject.IsUnknown() || subject.IsError()) { + // Propagate unknowns and errors. + return; + } if (!subject->Is()) { frame->Abort(absl::InternalError( "First argument for regular expression match must be a string"));