Your best bet here is an execution timeout, but this can cause false positives
if the loop is large enough and intentional. In the general case, it’s
impossible due to the Halting Problem as raised elsewhere in the thread.
> On Aug 7, 2023, at 6:02 AM, Aditya Kumar1
> wrote:
>
> Hi,
>
> I
Probably you only can detect something trivial like a while(true) {... }
analyzing the code. But beyond that... Well it's the "Halting problem" (
https://en.wikipedia.org/wiki/Halting_problem ) :
In computability theory