Recursion can cause problems (though it's easy to detect if you can make a callgraph), but the harder one in most cases is constructing your callgraph in the face of function pointers and other runtime abstractions. It's possible to do a worst-case analysis if you have types that are constrained enough to reduce the possible targets of such a call to a reasonably small set, but most static stack analysis tools bail on trying to analyse this at all.