[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] arthur's bugs



As a random example, the program below was automatically reduced (using the external reducer, not Xuejun's).

I just reported this one to LLVM. Before doing this I reduced it a bit more by hand, but really very little work was required:

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

John



int crc32_context;
int printf (const char *, ...);
void
transparent_crc (int val, int *vname, int flag)
{
  crc32_context = val;
}

void
platform_main_end (int x)
{
  printf ("checksum = %x\n", x);
}

int g_50[] = {
  0, 0, 0, 0, 1, 0, 0
};

int *func_2 (unsigned short, unsigned long long, int *p_5, short);
int
func_1 (void)
{
  int *g_200 = func_2 (1, 0, 0, 0);
  return 0;
}

int *
func_2 (unsigned short p_3, unsigned long long p_4, int *p_5, short p_6)
{
  for (0; p_4 <= 1; p_4 += 1)
    g_50[p_4 + 5] = g_50[p_4 + 4];
  return 0;
}

int
main (int argc, char *argv[])
{
  int i;
  func_1 ();
  for (i = 0; i < 7; i++)
    printf ("%d\n", g_50[i]);
  platform_main_end (crc32_context);
  return 0;
}