Skip to content

Fix #5442: [java] Fix stackoverflow with recursive generic types#5528

Merged
adangel merged 3 commits into
pmd:mainfrom
oowekyala:issue5442-stackoverflow
Feb 20, 2025
Merged

Fix #5442: [java] Fix stackoverflow with recursive generic types#5528
adangel merged 3 commits into
pmd:mainfrom
oowekyala:issue5442-stackoverflow

Conversation

@oowekyala

@oowekyala oowekyala commented Feb 14, 2025

Copy link
Copy Markdown
Member

I unfortunately wasn't able to create source that triggers the bug. I identified the infinite loop from the stack trace, and had to add a new entry point to the convertibility visitor to fall into it. #5505 provided a test case.

Describe the PR

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

I wasn't able to create source that triggers
the bug without going creating a new code path...
@ghost

ghost commented Feb 14, 2025

Copy link
Copy Markdown
1 Message
📖 Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

@adangel adangel changed the title [java] Fix #5442 - stackoverflow in PMD 7.9.0 Fix #5442: [java] Fix stackoverflow with recursive generic types Feb 20, 2025
@adangel adangel added this to the 7.11.0 milestone Feb 20, 2025
Comment thread pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/SubtypingTest.kt Outdated

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adangel adangel merged commit 46f25a1 into pmd:main Feb 20, 2025
adangel added a commit that referenced this pull request Feb 20, 2025
adangel added a commit that referenced this pull request Feb 20, 2025
Merge pull request #5528 from oowekyala:issue5442-stackoverflow
@oowekyala oowekyala deleted the issue5442-stackoverflow branch February 20, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[java] java.lang.StackOverflowError while executing a PmdRunnable [java] StackOverflowError with recursive generic types

2 participants