RFR: 8317132: Prepare HotSpot for permissive- [v5]

Julian Waters jwaters at openjdk.org
Tue Oct 3 02:24:39 UTC 2023


On Mon, 2 Oct 2023 14:34:45 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> The little gotcha in there is that goto is allowed to jump over the declaration of a scalar (of primitive type) local, but not the definition of one (declaration + initialization together). Hence goto is not allowed to jump over address pc = x; for instance, but is allowed to for address pc; pc = x;
>
> Right, so we're employing a workaround to silence the warning. That seems like the tail wagging the dog though. 
> 
> There's a potential issue in this code that the warning tries to point out: the code after the label might access the uninitialized variables, since they are in scope. Re-writing the code in the way you did makes the warning go away, but not the potential issue?

Not entirely sure what the issue is, since the code that goto jumps to never uses the uninitialized locals. I don't really have any other solutions to solve this issue unfortunately :/ Maybe @djelinski can add some perspective on this?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15955#discussion_r1343376830


More information about the hotspot-runtime-dev mailing list