[lworld] Integrated: 8280524: [lworld] Interpreter incorrectly handles uninitialized static inline type field
Tobias Hartmann
thartmann at openjdk.java.net
Tue Jan 25 12:27:50 UTC 2022
On Tue, 25 Jan 2022 10:57:57 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Code in the interpreter that's supposed to check if the type of a static, null-free inline type field is initialized assumes that `rcx` contains the `InlineKlass*`. However, `rcx` is only initialized for non-static fields:
> https://github.com/openjdk/valhalla/blob/ba87b167f2fe2327508a06ec8652c6ddaa9402c1/src/hotspot/cpu/x86/templateTable_x86.cpp#L2939-L2943
>
> As a result, the check spuriously fails, leading to an "impossible" NPE because the null value is not replaced by the default value. This patch also fixes an unrelated issue where an `instanceHandle` should be used instead of an `instanceOop`.
>
> I found this with compiler stress testing and initially assumed that it is a compiler bug. The patch was contributed by @fparain.
>
> Thanks,
> Tobias
This pull request has now been integrated.
Changeset: 41147748
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.java.net/valhalla/commit/41147748dfb9f7c3db52b7798d92f2c90e1573b0
Stats: 6 lines in 2 files changed: 1 ins; 0 del; 5 mod
8280524: [lworld] Interpreter incorrectly handles uninitialized static inline type field
Co-authored-by: Frederic Parain <fparain at openjdk.org>
Reviewed-by: fparain
-------------
PR: https://git.openjdk.java.net/valhalla/pull/617
More information about the valhalla-dev
mailing list