RFR: 8330185: Potential uncaught unsafe memory copy exception

Sandhya Viswanathan sviswanathan at openjdk.org
Fri Apr 12 23:55:41 UTC 2024


On Fri, 12 Apr 2024 20:00:35 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:

> Adding an `UnsafeCopyMemoryMark` in `generate_disjoint_copy_avx3_masked()` to protect against SIGBUS in `arraycopy_avx3_large()`.  I discovered this by code inspection, and the missing memory mark is inconsistent with all other generators.  I do not have a testcase to generate such an exception.  I think this may have been a copy/paste error by the original contributor as evidenced by the variable `ucme_exit_pc` having been set but never used.
> 
> I have not seen a VM crash that can be attributed to this, but adding the mark is the correct behavior for its prevention.

Looks good to me as well. Thanks for fixing this.

-------------

Marked as reviewed by sviswanathan (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18766#pullrequestreview-1998747585


More information about the hotspot-compiler-dev mailing list