[foreign-memaccess] RFR: 8245227: VarHandle adaptation fails when non-crackable direct method handles are used as adapters
mcimadamore at openjdk.java.net
Mon May 18 18:06:07 UTC 2020
Not all direct method handles are crackable with revealDirect. When such adapters are enountered by the logic which
checks for absence of exception, an exception is thrown - since the code tries to test as to whether the adapter is a
direct handle and if so, an invocation to `revealDirect` occurs.
The solution is to obtain the member name from the direct handle and then take it from there (note that in such cases,
the member name is still set to the one of the crackable handle), and to avoid the more public `revealDirect` API.
- Fix bug with adaptation support and non-crackable direct handles
Stats: 40 lines in 2 files changed: 29 ins; 0 del; 11 mod
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/177/head:pull/177
More information about the panama-dev