Skip to content

LibGraal lookup Java Field Issue #11438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HumphreyHCB
Copy link

@HumphreyHCB HumphreyHCB commented Jun 18, 2025

As requested by @dougxc on Slack,
I’m opening my changes as a PR to help illustrate what I’m doing.

The issue is coming from:
context.getMetaAccess().lookupJavaField(BuboCache.class.getField(FieldName))
being performed in a phase while in LibGraal mode.

All of this works in JarGraal,
but when I switch over, I get the following crash.

java.lang.NoSuchFieldException: TimeBuffer
	at java.base@26/java.lang.Class.checkField(DynamicHub.java:1330)
	at java.base@26/java.lang.Class.getField(DynamicHub.java:1310)
	at LibGraalClassLoader//jdk.graal.compiler.phases.common.BuboInstrumentationHighTierPhase.createBuboAddress(BuboInstrumentationHighTierPhase.java:112)
	at LibGraalClassLoader//jdk.graal.compiler.phases.common.BuboInstrumentationHighTierPhase.run(BuboInstrumentationHighTierPhase.java:87)
	at LibGraalClassLoader//jdk.graal.compiler.phases.common.BuboInstrumentationHighTierPhase.run(BuboInstrumentationHighTierPhase.java:58)
	at LibGraalClassLoader//jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:468)
	at LibGraalClassLoader//jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:334)
	at LibGraalClassLoader//jdk.graal.compiler.core.phases.BaseTier.run(BaseTier.java:65)
	at LibGraalClassLoader//jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:468)
	at LibGraalClassLoader//jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:334)
	at LibGraalClassLoader//jdk.graal.compiler.core.GraalCompiler.emitFrontEnd(GraalCompiler.java:283)
	at LibGraalClassLoader//jdk.graal.compiler.core.GraalCompiler.compile(GraalCompiler.java:152)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.HotSpotGraalCompiler.compileHelper(HotSpotGraalCompiler.java:312)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.HotSpotGraalCompiler.compile(HotSpotGraalCompiler.java:342)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:316)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:149)
	at LibGraalClassLoader//jdk.graal.compiler.core.CompilationWrapper.run(CompilationWrapper.java:235)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:576)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:538)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:211)
	at LibGraalClassLoader//jdk.graal.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:141)
	at LibGraalClassLoader//jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(HotSpotJVMCIRuntime.java:949)

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant