Integrated: 8261395: C1 crash "cannot make java calls from the native compiler"
David Holmes
dholmes at openjdk.java.net
Wed May 12 05:25:22 UTC 2021
On Fri, 7 May 2021 05:26:41 GMT, David Holmes <dholmes at openjdk.org> wrote:
> If a nest host and a nest member are associated with different protection domains it can lead to execution of Java code (to validate the "new" protection domain) during a nestmate access check, if nest membership verification has not yet been performed. This will cause assertion or guarantee failures if executed by a JIT compiler thread during access checks.
>
> After much discussion and trying different solutions it was decided that the existing logic for nest membership validation unnecessarily tries to resolve constant-pool entries, when it suffices that the symbolic entry in the constant-pool has the same name as the class being checked. Given this check occurs after we have verified the nest host and the purported member are loaded by the same classloader and in the same runtime package, there can only be one class with the name of the member, and that is the member class. Hence resolution of the constant-pool entry serves no purpose but introduces the complexity of dealing with exceptions and avoiding Java code execution in compiler threads.
>
> @iklam contributed to an earlier version of the fix, and devised the initial testcase approach.
> @coleenp also contributed to an earlier version of the fix.
>
> Thanks to both Coleen and Ioi for their insights, discussions and contributions.
>
> Testing:
> - the new test
> - tiers 1-3
>
> Thanks,
> David
This pull request has now been integrated.
Changeset: e828a939
Author: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/e828a939a8155a3b4ab26811a405bb4e4b2b99e8
Stats: 226 lines in 4 files changed: 167 ins; 40 del; 19 mod
8261395: C1 crash "cannot make java calls from the native compiler"
Co-authored-by: Ioi Lam <iklam at openjdk.org>
Co-authored-by: Coleen Phillimore <coleenp at openjdk.org>
Reviewed-by: iklam, hseigel, coleenp
-------------
PR: https://git.openjdk.java.net/jdk/pull/3913
More information about the hotspot-runtime-dev
mailing list