Can a recursive call in a function lead to a segmentation fault if the memory stack use is high?
Asked
Active
Viewed 34 times
1
-
1yes, see for example https://stackoverflow.com/questions/59739589/why-segmentation-fault-error-in-recursive-function/59751808#59751808 where it just happened, even with small calls – B. Go Jan 17 '20 at 17:51
1 Answers
0
Can a recursive call in a function lead to a segmentation fault if the memory stack use is high?
Yes: this happens all the time if you try to execute on a small stack, if you use too much, or if you have infinite recursion.

Employed Russian
- 199,314
- 34
- 295
- 362