On Mon, 23 Nov 2026 15:19:51 GMT, Weijun Wang <[email protected]> wrote:

> Is it safe to goto the end when some variables (for example, `rawData`) have 
> not been initialized? I remember we discussed on this before but I forgot the 
> exact answer.

We 'goto-jump' only if rawData is NULL  


        if (rawData == NULL) {
            goto errOut;
        }


probably we should move also the other variables that are involved in the 
cleanup to the start of the try-block

        CFStringRef passwordStrRef = NULL;
        jchar *passwordChars = NULL;


Just jumping over them, looks indeed not good (even if it somehow works).  So 
should I move those too, to make sure the variable used in the errOut - cleanup 
are all nicely initialized ?

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

PR Comment: https://git.openjdk.org/jdk/pull/33999#issuecomment-7105576065

Reply via email to