Skip to content

Commit 59810ad

Browse files
committedFeb 19, 2025
8350201: Out of bounds access on Linux aarch64 in os::print_register_info
Reviewed-by: dholmes, mdoerr
1 parent 2353f3e commit 59810ad

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ void os::print_context(outputStream *st, const void *context) {
447447
}
448448

449449
void os::print_register_info(outputStream *st, const void *context, int& continuation) {
450-
const int register_count = 32 /* r0-r32 */ + 3 /* pc, lr, sp */;
450+
const int register_count = 32 /* r0-r31 */ + 3 /* pc, lr, sp */;
451451
int n = continuation;
452452
assert(n >= 0 && n <= register_count, "Invalid continuation value");
453453
if (context == nullptr || n == register_count) {

‎src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void os::print_context(outputStream *st, const void *context) {
354354
}
355355

356356
void os::print_register_info(outputStream *st, const void *context, int& continuation) {
357-
const int register_count = 32 /* r0-r31 */;
357+
const int register_count = 31 /* r0-r30 */;
358358
int n = continuation;
359359
assert(n >= 0 && n <= register_count, "Invalid continuation value");
360360
if (context == nullptr || n == register_count) {

‎src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ void os::print_context(outputStream *st, const void *context) {
467467
}
468468

469469
void os::print_register_info(outputStream *st, const void *context, int& continuation) {
470-
const int register_count = 32 /* r0-r32 */ + 3 /* pc, lr, ctr */;
470+
const int register_count = 32 /* r0-r31 */ + 3 /* pc, lr, ctr */;
471471
int n = continuation;
472472
assert(n >= 0 && n <= register_count, "Invalid continuation value");
473473
if (context == nullptr || n == register_count) {

5 commit comments

Comments
 (5)

openjdk-notifier[bot] commented on Feb 19, 2025

@openjdk-notifier[bot]

MBaesken commented on Mar 7, 2025

@MBaesken
MemberAuthor

/backport jdk24u

openjdk[bot] commented on Mar 7, 2025

@openjdk[bot]

@MBaesken the backport was successfully created on the branch backport-MBaesken-59810ad7-master in my personal fork of openjdk/jdk24u. To create a pull request with this backport targeting openjdk/jdk24u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 59810ad7 from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 19 Feb 2025 and was reviewed by David Holmes and Martin Doerr.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk24u:

$ git fetch https://github.com/openjdk-bots/jdk24u.git backport-MBaesken-59810ad7-master:backport-MBaesken-59810ad7-master
$ git checkout backport-MBaesken-59810ad7-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk24u.git backport-MBaesken-59810ad7-master

MBaesken commented on Mar 10, 2025

@MBaesken
MemberAuthor

/backport jdk21u-dev

openjdk[bot] commented on Mar 10, 2025

@openjdk[bot]

@MBaesken the backport was successfully created on the branch backport-MBaesken-59810ad7-master in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 59810ad7 from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 19 Feb 2025 and was reviewed by David Holmes and Martin Doerr.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-MBaesken-59810ad7-master:backport-MBaesken-59810ad7-master
$ git checkout backport-MBaesken-59810ad7-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-MBaesken-59810ad7-master
Please sign in to comment.