Skip to content

Commit

Permalink
8322163: runtime/Unsafe/InternalErrorTest.java fails on Alpine after …
Browse files Browse the repository at this point in the history
…JDK-8320886

Reviewed-by: mdoerr, clanger
  • Loading branch information
MBaesken committed Dec 22, 2023
1 parent dce7a57 commit 1230853
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hotspot/share/utilities/copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,16 @@ void Copy::fill_to_memory_atomic(void* to, size_t size, jubyte value) {
}
} else {
// Not aligned, so no need to be atomic.
#ifdef MUSL_LIBC
// This code is used by Unsafe and may hit the next page after truncation of mapped memory.
// Therefore, we use volatile to prevent compilers from replacing the loop by memset which
// may not trigger SIGBUS as needed (observed on Alpine Linux x86_64)
jbyte fill = value;
for (uintptr_t off = 0; off < size; off += sizeof(jbyte)) {
*(volatile jbyte*)(dst + off) = fill;
}
#else
Copy::fill_to_bytes(dst, size, value);
#endif
}
}

5 comments on commit 1230853

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on 1230853 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken the backport was successfully created on the branch backport-MBaesken-12308533 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u: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 12308533 from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 22 Dec 2023 and was reviewed by Martin Doerr and Christoph Langer.

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/jdk22u:

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk22

@openjdk
Copy link

@openjdk openjdk bot commented on 1230853 Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RealCLanger the backport was successfully created on the branch backport-RealCLanger-12308533 in my personal fork of openjdk/jdk22. To create a pull request with this backport targeting openjdk/jdk22: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 12308533 from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 22 Dec 2023 and was reviewed by Martin Doerr and Christoph Langer.

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/jdk22:

$ git fetch https://github.com/openjdk-bots/jdk22.git backport-RealCLanger-12308533:backport-RealCLanger-12308533
$ git checkout backport-RealCLanger-12308533
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22.git backport-RealCLanger-12308533

Please sign in to comment.