[lworld] Integrated: 8228634: [lworld] ciField::will_link() returns incorrect result for the withfield bytecode

Tobias Hartmann thartmann at openjdk.java.net
Mon Dec 14 07:07:07 UTC 2020


On Fri, 11 Dec 2020 12:44:57 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> In `GraphBuilder::withfield`, `ciField::will_link()` can return false even if the holder klass is loaded (see bug comments). In that case we should not deoptimize but patch the store instruction that writes the new field value. That is required even if the field offset is known because the field could not be accessible/available and we would need to throw an exception during patching. The load/store instructions emitted by `copy_inline_content` to initialize the fields of the new inline type buffer copy should never require patching: We know their offsets (because the holder is loaded) and we don't need to check access restrictions.
> 
> Unrelated changes:
> - Array loads should not be delayed if the subsequent getfield requires patching (see changes to `GraphBuilder::load_indexed`)
> - Replaced the `WithField` and `DefaultValue` IR nodes by a `Deoptimize` node
> - Refactoring and removal of dead code
> 
> Thanks,
> Tobias

This pull request has now been integrated.

Changeset: 67f86bdb
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/67f86bdb
Stats:     191 lines in 15 files changed: 30 ins; 97 del; 64 mod

8228634: [lworld] ciField::will_link() returns incorrect result for the withfield bytecode

Reviewed-by: fparain

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

PR: https://git.openjdk.java.net/valhalla/pull/301


More information about the valhalla-dev mailing list