Unsafe vs MemorySegments / Bounds checking...
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Oct 29 19:07:20 UTC 2024
On 29/10/2024 18:35, Brian S O'Neill wrote:
> If you recall, I did send you a reproducer, and you did verify the
> regression. This is what led you to come up with a strategy to define
> a derived VarHandle. This helped somewhat, but you observed the
> inliner giving up when the code was embedded in a very large method.
> JDK 23 appears to have introduced a regression that has made this worse.
The fact that you mention that 23 made it worse reminds me of [1], where
a fix in 23 created an issue for adapted memory access var handles.
If I recall correctly, the workaround we suggested was _also_ using
adapted var handles.
So I wonder if (a) you were already running into the issue in [1] and
(b) because of that JDK 23 made it worse for you.
Did you have a chance to try your project with the latest JDK 24 build?
Is the regression gone there? That would be useful to know regardless of
the wider discussion.
Maurizio
[1] -
https://mail.openjdk.org/pipermail/panama-dev/2024-September/020643.html
More information about the panama-dev
mailing list