Skip to content
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

AARCH64: VM crashes with -NearCpool +UseShenandoahGC options #22448

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

Conversation

bulasevich
Copy link
Contributor

@bulasevich bulasevich commented Nov 28, 2024

Here is the fix for the problem:

  • MacroAssembler::adrp should use oop_Relocation from movoop (call stack: MacroAssembler::movoop -> MacroAssembler::ldr_constant -> MacroAssembler::adrp -> code_section::relocate).
  • Relocation::pd_set_data_value should account for the adrp+ldr sequence.

I have the following questions:

  • Is the NearCpool JVM option truly necessary? How is it used?
  • Although NearCpool is described as being related to the constant pool, it appears to be applied in loading nmethod.oops() rather than directly in constant pool loading.

Note. The same issue is reproduced on riscv platform.

A related change: #21276


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22448/head:pull/22448
$ git checkout pull/22448

Update a local copy of the PR:
$ git checkout pull/22448
$ git pull https://git.openjdk.org/jdk.git pull/22448/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22448

View PR using the GUI difftool:
$ git pr show -t 22448

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22448.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 28, 2024

👋 Welcome back bulasevich! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 28, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Nov 28, 2024

@bulasevich The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@theRealAph
Copy link
Contributor

theRealAph commented Nov 29, 2024

Here is the fix for the problem:

I have the following questions:

Is the NearCpool JVM option truly necessary? How is it used?

It was never clear whether the constant pool would always be in reach of a ldr. As far as I know it still isn't clear.
So -NearCpoolexists in case cpool isn't reachable. But as far as I know, the constant pool is always next to the code section and the offset is 19 bits, so I don't think that -NearCpool will ever be needed.

Although NearCpool is described as being related to the constant pool, it appears to be applied in loading nmethod.oops() rather than directly in constant pool loading. Could you clarify its purpose and implementation?

It's essentially the same problem that I described above. Will the nmethod oops table always be in range of an ldr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants