Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.7.10, 1.8.6
-
Fix Version/s: None
-
Labels:None
-
Environment:HideGroovy Version: 1.8.6 JVM: 1.6.0_29 Vendor: Apple Inc. OS: Mac OS X
Groovy Version: 1.7.10 JVM: 1.6.0_29
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)ShowGroovy Version: 1.8.6 JVM: 1.6.0_29 Vendor: Apple Inc. OS: Mac OS X Groovy Version: 1.7.10 JVM: 1.6.0_29 java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
-
Testcase included:yes
-
Number of attachments :
Description
Nearly identical methods with calls to super.methodName(). One works and the other fails with a stack overflow. This has been tested with 1.8.6 and 1.7.10, fresh downloads, no CLASSPATH set or GROOVY_HOME that would invalidate the results.
Output:
andrew.smith@lt-asmith-mac ~/Downloads/groovy-1.7.10 % bin/groovy -version ; bin/groovy ~/Workspace/Testing/src/test/groovy/StackOverflowIssue.groovy | head -n 50 Groovy Version: 1.7.10 JVM: 1.6.0_29 Hello Andrew JUnit 4 Runner, Tests: 2, Failures: 1, Time: 237 Test Failure: testAlternateCall(TestCase) java.lang.StackOverflowError at java.lang.String.indexOf(String.java:1521) at java.lang.ClassLoader.checkName(ClassLoader.java:775) at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:947) at groovy.lang.GroovyClassLoader$InnerLoader.loadClass(GroovyClassLoader.java:447) at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:793) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:147) at C.createForACount(StackOverflowIssue.groovy:58) at B.createForACount(StackOverflowIssue.groovy) at C.super$4$createForACount(StackOverflowIssue.groovy) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:147) at C.createForACount(StackOverflowIssue.groovy:58) at B.createForACount(StackOverflowIssue.groovy) at C.super$4$createForACount(StackOverflowIssue.groovy) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:147) at C.createForACount(StackOverflowIssue.groovy:58) at B.createForACount(StackOverflowIssue.groovy) at C.super$4$createForACount(StackOverflowIssue.groovy) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127)
I believe this is a duplicate of GROOVY-5385 and/or GROOVY-5352.