[LLVMbugs] [Bug 21945] New: clang crashes with -ferror-limit=1

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 18 01:07:38 PST 2014


            Bug ID: 21945
           Summary: clang crashes with -ferror-limit=1
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alastair.donaldson at imperial.ac.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13560
  --> http://llvm.org/bugs/attachment.cgi?id=13560&action=edit
Example illustrating the issue


clang -ferror-limit=1 example.c

on the attached causes clang to crash with a stack dump (Windows stack dump and
other info below)

The issue is reproducible with 3.5, trunk, and the Apple version of clang.

We found this issue indirectly using Csmith.

C:\temp>clang -ferror-limit=1 example.c
example.c:2:5: error: unknown type name 'uint'; did you mean 'int'?
    uint g_275;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Stack dump:
0.      Program arguments: C:\prog\llvm35-build\Release\bin\clang.exe -cc1
-triple i686-pc-windows-m
svc -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
example.c -mrelocatio
n-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentiu
m4 -dwarf-column-info -resource-dir
C:\prog\llvm35-build\Release\bin\..\lib\clang\3.5.0 -internal-is
ystem C:\prog\llvm35-build\Release\bin\..\lib\clang\3.5.0\include
-internal-isystem C:\Program Files
 (x86)\Microsoft Visual Studio 11.0\VC\include -internal-isystem C:\Program
Files (x86)\Windows Kits
\8.1\include -fdebug-compilation-dir C:\temp -ferror-limit 1 -fmessage-length
100 -mstackrealign -fm
s-extensions -fms-compatibility -fms-compatibility-version=17.00
-fdelayed-template-parsing -fobjc-r
untime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
0cae7c.o -x c example.c
1.      example.c:8:54: current parser token ';'
2.      example.c:7:1: parsing function body 'func_45'
3.      example.c:7:1: in compound statement ('{}')
0x00EB7722 (0x01FEA5B0 0x01FEA0F0 0x01D0B73C 0x00E987C2)
0x00EA351E (0x01FEA5B0 0x01D0B970 0x01D0B810 0x01D0BA30)
0x00E987C2 (0x01D0B810 0x01D0C184 0x01FEA5B0 0x01FEA5B0)
0x00E99889 (0x01FEA5B0 0x01D0B810 0x01FEA5E8 0x01D0B970)
0x00EBEB82 (0x01D0B810 0x01FEA5E8 0x01D0C004 0x01D0C004)
0x00E9D84B (0x01FEA5E8 0x01FEA5E8 0x01D0C004 0x01D0C184)
0x00EA7828 (0x01FEA5E8 0x01FEA150 0x01D0C0B0 0x00E98420)
0x00E9F955 (0x01FEA5E8 0x01FEA5E8 0x01D0C2DC 0x01D0C184)
0x00E98420 (0x01D0C2DC 0x01D0C184 0x01FEA5E8 0x01FEA5E8)
0x00E98F8A (0x01D0C184 0x01FEA5E8 0x01D0C2DC 0x01D0C370)
0x00E990AD (0x01D0C2D4 0x01FE2F30 0x01FEA5E8 0x01D0C370)
0x00CE07A3 (0x01D0C370 0x01FE2F30 0x01FEA5E8 0x00000020)
0x00CE073B (0x01D0C370 0x01FE2F30 0x01FEA5E8 0x01FEA5E8)
0x00CD9A48 (0x02004950 0x01FEA5E8 0x01FEA140 0x0000004B)
0x00CD6830 (0x02004950 0x01FEA618 0x0000004B 0x01FEA618)
0x00CD88E4 (0x01FEA618 0x0000004B 0x01FEA100 0x01FEA570)
0x00B64421 (0x01D0C4FC 0x01FEA618 0x0000004B 0x00000000)
0x00B066F8 (0x01FEA570 0x01FEA600 0x00000000 0x01D0D200)
0x009ED760 (0x01D0D384 0x01D0D364 0x00000000 0x01D0DB14)
0x009ECA21 (0x01D0DB14 0x01D0D8B0 0x00000007 0x00000000)
0x009F55C7 (0x01D0DB14 0x01D0DC8C 0x00000007 0x01D0DB10)
0x009ED058 (0x01D0DB14 0x01D0DC8C 0x00000007 0x01D0DB10)
0x00A14A5A (0x01D0DB38 0x01D0DC8C 0x00000000 0x00000000)
0x00A14371 (0x01D0DC14 0x01D0DC8C 0x00000000 0x00000000)
0x00A11229 (0x01D0DD80 0x00000000 0x01FEA4F0 0x01D0E410)
0x00A1299E (0x01FEA4F0 0x01D0DE08 0x0201A960 0x01D0E410)
0x009DC9F1 (0x01D0DEC0 0x01D0DEA0 0x01D0E384 0x01D0E410)
0x009EC7E0 (0x01D0E6A8 0x01D0E410 0x00000000 0x00000001)
0x009DB967 (0x01D0E6A8 0x01D0E688 0x01D0E410 0x00000003)
0x009DBA74 (0x01D0E6A8 0x01D0E688 0x00000000 0x00000003)
0x009DC216 (0x01D0E6A8 0x01D0E688 0x00000000 0x00000000)
0x009DDD16 (0x01D0E6E4 0x01FC7AB8 0x01FBF470 0x01FC7AB8)
0x009D8FE7 (0x02004950 0x00000000 0x00000000 0x01FBF470)
0x0064E0A1 (0x00000000 0x01FBF470 0x01FC7AB8 0x00635A7B)
0x0064DFDF (0x01FC7AB8 0x01FC6208 0x01FBF470 0x01FBF470)
0x006820E1 (0x01FBF470 0x0000002E 0x00000000 0x01D0F404)
0x0014595A (0x01D0F40C 0x01D0F4BC 0x01FC62C0 0x001426E0)
0x00144322 (0x0000002E 0x01FC4898 0x01FC0E88 0x82B50D13)
0x00F38AC1 (0x7E9EF000 0x01D0F9E0 0x77970BBB 0x7E9EF000)
0x769C919F (0x7E9EF000 0xF432F514 0x00000000 0x00000000), BaseThreadInitThunk()
+ 0xE bytes(s)
0x77970BBB (0xFFFFFFFF 0x7795C9D4 0x00000000 0x00000000),
RtlInitializeExceptionChain() + 0x84 bytes
0x77970B91 (0x00F38B29 0x7E9EF000 0x00000000 0x00000000),
RtlInitializeExceptionChain() + 0x5A bytes
clang.exe: error: clang frontend command failed due to signal (use -v to see
clang version 3.5.0 (219114)
Target: i686-pc-windows-msvc
Thread model: posix
clang.exe: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the
 crash backtrace, preprocessed source, and associated run script.
clang.exe: note: diagnostic msg:

Preprocessed source(s) and associated run script(s) are located at:
clang.exe: note: diagnostic msg:
clang.exe: note: diagnostic msg:
clang.exe: note: diagnostic msg:


You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141218/b00320a2/attachment.html>

More information about the llvm-bugs mailing list