This tool is donation based and free. 🙏 We're looking for donations to keep it running — $360/year covers our server costs.

$18 of $360 · 5%
Donate
This fact check is over 3 months old. The situation may have changed significantly — please recheck before relying on it.

Is Infinite Recursion Dangerous

“Is Infinite recursion dangerous”
Yes, dangerous
Confidence: High Checked on May 16, 2026

Summary

Infinite recursion never reaches a base case, causing unbounded growth of the call stack and exhausting memory. This typically results in stack overflow, program crashes, or system instability and can be exploited for denial‑of‑service attacks, making it hazardous for software and computers.

Recheck this fact Runs a fresh check with up-to-date sources

Sources 60 searched

sciencedirect.com
  • The never-ending recursion - ScienceDirect

    On this view, recursion is a property of the mind/brain. The second one disregards this conception of recursion and redefines it in terms of either the processing of self-embedded structures (e.g. [20]) or the ability to represent multiple hierarchical levels using the same rule (e.g.

pages.cs.wisc.edu
  • Recursion

    Here's another example; this version does have a base case, but the call badPrint2(2) will still cause an infinite recursion: void badPrint2( int k ) { if (k < 0) return; System.out.println(k); badPrint2( k+1 ); } This inspires: ... Every recursive method must make progress toward the base case to prevent infinite recursion.

eng.libretexts.org
discuss.python.org
  • Infinite recursion - Python Help - Discussions on Python.org

    In python version 3.13… I noticed the possibility of creating infinite recursion, that is, the stack does not overflow, this could be attributed to optimizing the “tail” recursion, but memory measurements showed that memory is consumed until it runs out.

en.wikipedia.org
  • Stack overflow - Wikipedia

    When a program attempts to use more space than is available on the call stack (that is, when it attempts to access memory beyond the call stack's bounds, which is similar to a buffer overflow), the stack is said to overflow, typically resulting in a program crash. The most common cause of stack overflow is excessively deep or infinite recursion, in which a function calls itself so many times that the space needed to store the variables and information associated with each call is more than can fit on the stack.

  • Infinite regress - Wikipedia

    So the regress starts with the fact that X is F. According to the recursive principle, this is only possible if there is a distinct Y that is also F. But in order to account for the fact that Y is F, we need to posit a Z that is F and so on. Once the regress has started, there is no way of stopping it since a new entity has to be introduced at each step in order to make the previous step possible. An infinite regress argument is an argument against a theory based on the fact that this theory leads to an infinite regress.

geeksforgeeks.org
stackoverflow.com
livelaptopspec.com
  • Can Infinite Recursion Harm Computer - Livelaptopspec

    An infinite loop will cause unexpected consumption of resources, such as CPU cycles or memory. This infinite loop will consume system resources and can be used to create a denial of service attack. Key Differences between Recursion and Iteration Infinite recursion can lead to system crash whereas, ...

This fact check is free and donation-based. $1 powers ~30 fact-checks.

Donate $1 to support fact-checking

Check another fact