| Summary: | Recursion error causes stack overflow when class inherits itself. | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Krister Renaud <contact> |
| Component: | cdt-codan | Assignee: | Marc-André Laperle <malaperle> |
| Status: | VERIFIED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | anberlin.myplace, cdtdoug, malaperle |
| Version: | 8.0.1 | ||
| Target Milestone: | 8.0.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed in 8.0.2 and master > 2012-01-14. Verified in 8.0.2 RC1. *** Bug 366680 has been marked as a duplicate of this bug. *** *** cdt git genie on behalf of Marc-Andre Laperle ***
Bug 368446 - NonVirtualDestructor checker: stack overflow when class
inherits itself
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d98768295b4ad9f212dfd55c84b53ae9a2cab4ca
*** cdt git genie on behalf of Marc-Andre Laperle ***
Bug 368446 - NonVirtualDestructor checker: stack overflow when class
inherits itself
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=5df781b1b1a2d0ce5d3a850a2836766c18a60f87
|
Build Identifier: M20110909-1335 When writing the following C++ code by mistake I get a stack overflow: // Start code class MyClass : public MyClass { }; // End code !SESSION 2012-01-12 13:36:11.971 ----------------------------------------------- eclipse.buildId=M20110909-1335 java.version=1.6.0_29 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=sv_SE Framework arguments: -product org.eclipse.epp.package.cpp.product -keyring /Users/khr/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.cpp.product -keyring /Users/khr/.eclipse_keyring -showlocation This is a continuation of log file /Users/khr/hg/test/.metadata/.bak_0.log Created Time: 2012-01-12 13:47:07.669 !ENTRY org.eclipse.cdt.codan.core 4 1 2012-01-12 13:47:07.669 !MESSAGE Internal Error !STACK 0 java.lang.StackOverflowError at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getDeclaredMethods(ClassTypeHelper.java:325) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassType.getDeclaredMethods(CPPClassType.java:368) at org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructor.getDestructor(NonVirtualDestructor.java:43) at org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructor.hasVirtualDestructor(NonVirtualDestructor.java:52) at org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructor.hasVirtualDestructor(NonVirtualDestructor.java:60) at org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructor.hasVirtualDestructor(NonVirtualDestructo Reproducible: Always Steps to Reproduce: 1. Enter the following code: // Start code // Code below should have been class MyClass : public MyClassBase class MyClass : public MyClass { }; // End code 2. Press <Apple>-S