When I compile this LLVM code with "llc -disable-fp-elim" then assemble the result with "gcc", and run it, it crashes almost every time. When I remove "-disable-fp-elim", the result works fine every time. target endian = little target pointersize = 32 implementation int %main() { entry: %Array = alloca [36 x [36 x int]] ret int 0 }
This is a bug in the linux kernel: arch/i386/mm/fault.c: /* * accessing the stack below %esp is always a bug. * The "+ 32" is there due to some instructions (like * pusha) doing post-decrement on the stack and that * doesn't show up until later.. */ if (address + 32 < regs->esp) goto bad_area; Fixing this is going to unfortunately require some fairly substantial work.
Fixed: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031013/008072.html