| Summary: | C++ parser throws StackOverflowError at self-extending class. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Dominik äger <dominikjaeger> | ||||
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, vagran.ast | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
*** cdt git genie on behalf of Markus Schorn ***
Bug 357256: Recursive inheritance causes a StackOverflowError.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8bc2b5635849a3c876a436eb794ac06170ccc9d3
Added testcase and fix. *** cdt git genie on behalf of Markus Schorn ***
Bug 357256: Recursive inheritance causes a StackOverflowError.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=38c0bca1206e09c4f414ca3bb0aaee8733bb8dbf
*** Bug 362402 has been marked as a duplicate of this bug. *** |
Created attachment 203071 [details] Log file describing the internal error When opening this snippet of (invalid) C++ code in CDT, a StackOverflowError is thrown: class A : A { }; int main(int, char**) { A a; return 0; } Instead, an error should brobably be displayed. For example, gcc says: ..\main.cpp:83:1: error: invalid use of incomplete type 'class A' ..\main.cpp:82:7: error: forward declaration of 'class A' I used the newest Eclipse (Windows 32 Bit) release from the eclipse.org download site: Eclipse IDE for C/C++ Developers Version: Indigo Release Build id: 20110615-0604 Eclipse C/C++ Development Tools Version: 8.0.0.201106081058 Build id: 201106081058 Windows 7 Professional (64 bit) Service Pack 1 Processor: AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ 2.10 GHz Installed memory (RAM): 2,00 GB The .log is attached for details. java full version "1.7.0-b147" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)