Additional symlink loop check for disable_advanced_recursive_link_checks#2809
Merged
iloveeclipse merged 1 commit intoJul 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the “simple” (non-advanced) recursive symlink detection path used when -Dorg.eclipse.core.resources.disable_advanced_recursive_link_checks is enabled, adding coverage for an additional loop scenario while keeping the performance-oriented tradeoff.
Changes:
- Extend
UnifiedTree’s cheap “backwards link” recursion detection to also consider the non-real parent path (to catch loops involving symlinked path segments). - Add a new regression test scenario with mutually recursive links across sibling directories and validate project traversal terminates.
- Adjust an existing symlink regression test to avoid running under the simple implementation (which can hang), and improve assertion messages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_185247_recursiveLinks.java | Adds a new mutually-recursive symlink structure test and refactors helpers to return the imported project for traversal. |
| resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/localstore/SymlinkResourceTest.java | Skips a known-hanging test case when advanced recursive link checks are disabled; improves assertion diagnostics. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java | Enhances the non-advanced recursion check to detect additional symlink loop cases by checking both real and non-real parent paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
24ba84a to
b224b6d
Compare
Contributor
iloveeclipse
commented
Jul 7, 2026
b224b6d to
e4c4020
Compare
If the (non default) system property `-Dorg.eclipse.core.resources.disable_advanced_recursive_link_checks"` is set, expensive advanced symlink checks are disabled to avoid performance / OOM issues. This is a known tradeoff between correctness and performance. This commit adds one more "symlink loop" use case detected by the "non advanced" recursive symlink checks code path.
e4c4020 to
7ffc8a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the (non default) system property
-Dorg.eclipse.core.resources.disable_advanced_recursive_link_checks"is set, expensive advanced symlink checks are disabled to avoid performance / OOM issues. This is a known tradeoff between correctness and performance.This commit adds one more "symlink loop" use case detected by the "non advanced" recursive symlink checks code path.