-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8346775: Improve os::current_stack_pointer #22864
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back jwaters! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@TheShermanTanker The following label will be automatically applied to this pull request:
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. |
os::current_stack_pointer has many varying implementations, some of which are erroneous. Additionally, this does not play well with Link Time Optimization, which often inlines the method into the caller, causing various issues such as the method return the frame pointer of the caller rather than the stack pointer, or the address of a dummy local, for instance. Improve os::current_stack_pointer to work correctly with Link Time Optimization and be more robust to errors, so that it returns the accurate value of the stack pointer, documented below
Current ways used to load the stack pointer:
BSD/Zero:
BSD/x86:
BSD/ARM64:
AIX/PPC:
Windows/ARM64:
Windows/x86:
Linux/Zero:
Linux/x86:
Linux/ARM64:
Linux/ARM:
Linux/RISC-V:
Linux/s390x:
Linux/PPC:
The assembly below indicates how to load the stack pointer in assembly for each supported architecture (Created via __builtin_stack_address with gcc):
x64:
x86:
ARM64:
ARM:
RISC-V:
s390x:
PPC:
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22864/head:pull/22864
$ git checkout pull/22864
Update a local copy of the PR:
$ git checkout pull/22864
$ git pull https://git.openjdk.org/jdk.git pull/22864/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22864
View PR using the GUI difftool:
$ git pr show -t 22864
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22864.diff