Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

This PR resolves issues with some registration methods not creating reachability-handlers. Bypassing the reachability handler in conditional registrations immediately adds condition types to the image heap, which causes types to be treated as reachable even if they shouldn't be. By preventing this, we avoid increasing image size and ensure that the intended semantics of typeReachable conditions are preserved.
All proxy registrations should avoid directly calling com.oracle.svm.core.reflect.proxy.DynamicProxySupport#addProxyClass, and instead should call the new method com.oracle.svm.hosted.reflect.proxy.ProxyRegistry#registerProxy which creates reachability-handler for previous method.

Additionally, this update adds missing validation checks, such as null argument and registration phase validation, across registration methods to improve code reliability. Redundant code in subclasses of ConditionalConfigurationRegistry has been refactored for greater consistency and maintainability.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 4, 2025
@graalvmbot graalvmbot changed the title [GR-65850][GR-68595] Fixing registration methods bypassing reachability handler creation and adding validation checks on registration methods. [GR-65850] [GR-68595] Fixing registration methods bypassing reachability handler creation and adding validation checks on registration methods. Sep 4, 2025
@graalvmbot graalvmbot force-pushed the mm/GR-65850-refactor-conditonal-configuration-registry branch from 05d4abf to a32ddb9 Compare September 5, 2025 08:57
@graalvmbot graalvmbot merged commit 448b0de into master Sep 5, 2025
13 checks passed
@graalvmbot graalvmbot deleted the mm/GR-65850-refactor-conditonal-configuration-registry branch September 5, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants