[LLVMdev] code generation goes into an infinite loop

Dan Gohman gohman at apple.com
Mon Oct 5 15:46:43 PDT 2009


On Oct 3, 2009, at 3:06 PM, Daniel Wilkerson wrote:

> We seem to be creating an infinite loop in llvm while trying to
> implement the simplest possible code generation.  Specifically, we are
> trying to emit code for the following program, as it is easily
> testable from the command-line:
>
>    int main(int argc) { return argc; }
>
> We got our code generator to build and link with llvm.  When we run
> it, it pauses when running the PrintModulePass and then exits with a
> bus error.  I suspect that this is an infinite loop leading to a stack
> overflow.

Are you able to run this under a debugger to locate the
infinite loop?

Dan




More information about the llvm-dev mailing list