You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/06/06 21:21:00 UTC

[jira] [Resolved] (GROOVY-10113) StackOverflowError in STC

     [ https://issues.apache.org/jira/browse/GROOVY-10113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-10113.
----------------------------------
    Fix Version/s: 4.0.0-beta-1
       Resolution: Fixed

> StackOverflowError in STC
> -------------------------
>
>                 Key: GROOVY-10113
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10113
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 4.0.0-alpha-2, 3.0.8
>            Reporter: Stefanos Chaliasos
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-beta-1
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I have the following Groovy program.
> {code:groovy}
> @groovy.transform.TypeChecked
> class Test<T extends T> {}
> {code}
> h2. Actual Behavior
> The compiler crashes with the following stacktrace.
> {code:java}
> >>> a serious error occurred: null
> >>> stacktrace:
> java.lang.StackOverflowError
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> ....
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> 	at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195)
> {code}
> h2. Expected Behavior
> Compile-time error. I would expect to report a cyclic inheritance error.
> h2. Affected Version
> This programs have been tested with the compiler from the master (commit: c36c8bf3d24ce41e972e3f3e7a5763acf96f46b1), 4.0.0-alpha-2, and 3.0.8.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)