[LLVMbugs] [Bug 2323] New: small input causes cc1 to use all RAM

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon May 12 19:41:29 PDT 2008


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

           Summary: small input causes cc1 to use all RAM
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


Using svn 50966 on Ubuntu Feisty on x86-32:

[regehr at babel tmp2]$ ulimit -v 1500000
[regehr at babel tmp2]$ llvm-gcc -Os -S small.c
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
*** glibc detected *** /home/regehr/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1:
free(): invalid pointer: 0x08c67640 ***
llvm-gcc: Internal error: Aborted (program cc1)
Please submit a full bug report.
See <URL:http://developer.apple.com/bugreporter> for instructions.
[regehr at babel tmp2]$ cat small.c

static inline unsigned long int
mod_rhs (const long int rhs)
{
}

int g_66 = -1;
int g_79 = 0xF7D1D410;
int func_29 (int p_30, signed char p_32, unsigned int p_34);
int func_62 (unsigned char p_64, int p_65, int p_67, unsigned char p_68);
int
func_27 (int p_28)
{
  unsigned char l_368 = -1;
  p_28 = func_29 (l_368, p_28, 1);
}

int
func_29 (int p_30, signed char p_32, unsigned int p_34)
{
  if (0x5ADF851F)
    {
      int l_131 = -1;
      unsigned int l_139 = -2;
      short l_143 = 1;
      if (p_32)
        {
          func_12 (1 * p_34 >= 1 - 1);
        }
      else
        {
          g_79 = p_30;
        }
      for (p_34 = -9; p_34 >= 0; --p_34)
        {
          unsigned char l_142 = 4;
          if (p_30)
            {
            }
          else
            {
              return l_139;
            }
          l_131 =
            1 > 1 < p_32 !=
            (1 % mod_rhs (func_62 (l_142, l_142, l_143, p_30))) | 1 *
            p_30 + 1;
        }
    }
}
int
func_62 (unsigned char p_64, int p_65, int p_67, unsigned char p_68)
{
  for (g_66 = -19; g_66 == 0; ++g_66)
    {
    }
}


-- 
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