[LLVMbugs] [Bug 4576] New: clang-cc -ast-dump crashes

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jul 18 07:05:43 PDT 2009


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

           Summary: clang-cc -ast-dump crashes
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AST
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: xuzhongxing at gmail.com
                CC: llvmbugs at cs.uiuc.edu


clang-cc crashes on the following code:

typedef __typeof__(sizeof(int)) size_t;
size_t f(char*);
int
ar_name (char *name)
{
  char *p;
  char *end;

  if (p == 0 || p == name)
    return 0;
  end = p + f(p) - 1;
  return 0;
}

$ clang-cc -ast-dump foo.c

typedef char *__builtin_va_list;
0   clang-cc  0x08c7acea
1   clang-cc  0x08c7b21d
2             0xb7f73400 __kernel_sigreturn + 0
3   clang-cc  0x0845d3e9
4   clang-cc  0x0824e22f
5   clang-cc  0x08469ad2
6   clang-cc  0x084679dc
7   clang-cc  0x0841f3c9
8   clang-cc  0x084229fa
9   clang-cc  0x084217bf
10  clang-cc  0x084227ae
11  clang-cc  0x08422987
12  clang-cc  0x08421272
13  clang-cc  0x08084fd1
14  clang-cc  0x082e7650
15  clang-cc  0x0806bd5e
16  clang-cc  0x0806db68 main + 3450
17  libc.so.6 0xb7cd1775 __libc_start_main + 229
18  clang-cc  0x08063c31
Stack dump:
0.      Program arguments: clang-cc -ast-dump foo.c 
1.      <eof> parser at end of file
segmentation fault


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