[LLVMbugs] [Bug 1743] New: allocation inside loop blows out stack

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 26 13:48:22 PDT 2007


           Summary: allocation inside loop blows out stack
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dalej at apple.com
                CC: llvmbugs at cs.uiuc.edu

The following (derived from a gcc test) repeatedly allocates a variable-sized
object inside a loop.  The 
intent is that the object should be deallocated each iteration, to avoid
blowing out the stack.  llvm does not currently do this.  (I can't find that
the standard requires this behavior, but it seems like a good idea.)

void *volatile p;
int  main (void)
  int n;
  for (n=0; n<1000000; n++) {
  int x[n % 47 + 1];
  x[0] = 1;
  p = x;
  return 0;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list