google / cel-spec

Common Expression Language -- specification and binary representation
https://cel.dev
Apache License 2.0
2.78k stars 222 forks source link

Adjust parser recursion limits #233

Closed TristonianJones closed 2 years ago

TristonianJones commented 2 years ago

Adjust the parser recursion limits to mirror production limits

CEL implementations must support certain minimum levels of rule recursion and repetition. Originally, these values were set at 32 for all operations whether the limit was practical or not. However, the initial limits proved difficult to encode into abstract syntax trees which would not exceed the stack recursion limits of gRPC and protobuf. These limits have been adjusted for practicality and with production recursion limits in mind.

TristonianJones commented 2 years ago

@jsannemo I believe this will close https://github.com/google/cel-spec/issues/197 as the C++ conformance harness uses the same parser as gRPC and it can now safely evaluate these expressions with the new limits.