[LLVMbugs] [Bug 3229] New: clang r61131 segfaults on invalid code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Dec 17 09:14:08 PST 2008


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

           Summary: clang r61131 segfaults on invalid code
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it


$ ./clang /tmp/bug.c
/tmp/bug.c:9530:24: error: expected '=', ',', ';', 'asm', or '__attribute__'
aft
er declarator
__inline static size_t __strcspn_c1(char const   *__s , int __reject ) 
                       ^
/tmp/bug.c:9549:24: error: expected '=', ',', ';', 'asm', or '__attribute__'
aft
er declarator
__inline static size_t __strcspn_c2(char const   *__s , int __reject1 , int
__re
ject2 ) 
                       ^
[...]
/tmp/bug.c:10716:12: note: previous declaration is here
static int vsf_sysutil_translate_sig(enum EVSFSysUtilSignal sig ) ;
           ^
/tmp/bug.c:10769:61: error: variable has incomplete type 'enum
EVSFSysUtilSignal'
static int vsf_sysutil_translate_sig(enum EVSFSysUtilSignal sig ) 
                                                            ^
0   clang 0x08a01585
1   clang 0x09c326f0
Segmentation fault (core dumped)

$ gdb ./clang core.6716 
GNU gdb Red Hat Linux (6.6-16.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libpthread.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libelf.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /usr/local/lib/libstdc++.so.6...done.
Loaded symbols for /usr/local/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./clang /tmp/bug.c'.
Program terminated with signal 11, Segmentation fault.
#0  0x08462785 in clang::Sema::UsualUnaryConversions ()
(gdb) info stack
#0  0x08462785 in clang::Sema::UsualUnaryConversions ()
#1  0xbf979844 in ?? ()
#2  0x00080da0 in ?? ()
#3  0xbf97a0e0 in ?? ()
#4  0x08532fc4 in clang::Parser::ParseParenExprOrCondition ()
#5  0x0848a234 in clang::Sema::ActOnStartOfSwitchStmt ()
#6  0xbf97a0e0 in ?? ()
#7  0xbf9797e8 in ?? ()
#8  0x00080d99 in ?? ()
#9  0x00080daa in ?? ()
#10 0x09d3e990 in ?? ()
#11 0xbf97a0e0 in ?? ()
#12 0x00000000 in ?? ()
(gdb)


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