RFR: 8330185: Potential uncaught unsafe memory copy exception

Vladimir Kozlov kvn at openjdk.org
Fri Apr 12 22:05:50 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.

What about `generate_conjoint_copy_avx3_masked`?

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

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


More information about the hotspot-compiler-dev mailing list