RFR: 8315954: getArgumentValues002.java fails on Graal [v2]
Doug Simon
dnsimon at openjdk.org
Fri Sep 15 14:01:21 UTC 2023
On Fri, 15 Sep 2023 13:56:00 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> This PR adds `HotSpotResolvedJavaMethod.getOopMapAt` to get the oop map for a method at a given BCI. This is required to do correct clearing of oops at OSR entry points.
>>
>> As part of this addition, I needed to be able to detect requests for oop maps at invalid BCIs. For this, I added `InterpreterOopMap::has_valid_mask()`. When an oop map computation is requested for an invalid BCI, this method returns false.
>
> Doug Simon has updated the pull request incrementally with three additional commits since the last revision:
>
> - generalized getLiveObjectLocalsAt to getOopMapAt
> - need to zero oop_map_buf
> - simplified getLiveObjectLocalsAt and moved it from ResolvedJavaMethod to HotSpotResolvedJavaMethod
src/hotspot/share/interpreter/oopMapCache.cpp line 616:
> 614: tmp->fill(method, bci);
> 615: if (tmp->has_valid_mask()) {
> 616: entry->resource_copy(tmp);
If `tmp` is invalid (e.g. oop map was requested for invalid BCI), then `resource_copy` crashes the VM in strange ways since it blindly trusts the mask size to be valid.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15705#discussion_r1325828568
More information about the graal-dev
mailing list