You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2026/07/08 02:16:28 UTC

(groovy) branch master updated: GROOVY-7785: Stack overflow when using too many chained method calls (guard test to pin current behavior: indy only not classic)

This is an automated email from the ASF dual-hosted git repository.

paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 58162cf458 GROOVY-7785: Stack overflow when using too many chained method calls (guard test to pin current behavior: indy only not classic)
58162cf458 is described below

commit 58162cf4589f85941f32969df17b6d3f552c6fa5
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Jul 8 12:16:14 2026 +1000

    GROOVY-7785: Stack overflow when using too many chained method calls (guard test to pin current behavior: indy only not classic)
---
 src/test/groovy/bugs/Groovy7785.groovy | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/test/groovy/bugs/Groovy7785.groovy b/src/test/groovy/bugs/Groovy7785.groovy
index d3ff54b60d..baedf2908c 100644
--- a/src/test/groovy/bugs/Groovy7785.groovy
+++ b/src/test/groovy/bugs/Groovy7785.groovy
@@ -20,13 +20,22 @@ package bugs
 
 import org.junit.jupiter.api.Disabled
 import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.condition.DisabledIfSystemProperty
 
 import static groovy.test.GroovyAssert.assertScript
 
 /**
  * Tests for GROOVY-7785: StackOverflowError with deeply nested chained method calls.
  * Each test uses chained method calls to verify the fix handles deep chains.
+ * <p>
+ * The fix (iterative chain flattening) is implemented in the invokedynamic
+ * writer only; classic bytecode generation still overflows the stack on very
+ * deep call chains. Classic is being phased out, so this is a documented
+ * limitation rather than a bug to fix — hence the tests are skipped when
+ * compiling with {@code groovy.target.indy=false}.
  */
+@DisabledIfSystemProperty(named = 'groovy.target.indy', matches = '(?i)false',
+    disabledReason = 'GROOVY-7785 deep-chain flattening is indy-only; classic codegen overflows on very deep chains')
 final class Groovy7785 {
 
     @Test