VMKit assertion failure

Recursion certainly isn't forbidden in the LLVM codebase, but anything that makes a number of recursive calls that potentially scales linearly with the size of the data set is a crash hazard. This is just how C works — really how any programming language works, given that the call isn't TCO-able without CPS conversion, which really just hides the problem of completely unnecessary linear space usage.

John.

Hi Eli,
I know the pass that fails, it is MachineCSE. It stack overflows because
there are too many recursive calls to processBlock (line 362 of
lib/CodeGen/MachineCSE.cpp). But the recursion is here on purpose, and I am
sure there are other places where LLVM makes recursive calls. Or is
recursion forbidden in LLVM, and explicitly stated to be so?

Unbounded recursion is generally considered a bug; please file.

-Eli

Filed:
http://llvm.org/bugs/show_bug.cgi?id=6876

Cheers,
Nicolas