RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit
David Holmes
dholmes at openjdk.org
Mon Jun 26 08:02:03 UTC 2023
On Mon, 26 Jun 2023 07:46:38 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> The usages of `vmSupport` below all use `JavaCalls:call_static` which takes care of linking and initializing the class.
Sure but my point is that initialization can fail and the code does not seem to directly take that into account - if the first `decode` encounters a class initialization error then it will just return with the exception pending and no decoding will actually have occurred. If we get to the `encode` first and it encounters an initialization error it will still attempt to do a `decode` that must in turn fail and again we return with an exception pending and no encoding/decoding occurring. This code does not seem to be written in a way that allows for an error initializing `VMSupport`. So while the fix side-steps the problematic guarantee, I think it is just highlighting that this code is prepared for "system" errors like this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14641#issuecomment-1606915981
More information about the hotspot-dev
mailing list