Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-11-02 Thread Julian Waters
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-11-01 Thread Julian Waters
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-04 Thread Valerie Peng
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v2]

2023-10-04 Thread Valerie Peng
On Tue, 3 Oct 2023 02:50:02 GMT, Julian Waters wrote: > @valeriepeng what's your opinion on this? Changes look fine to me. Although I wonder if we should add a comment to prevent future modification which re-introduces the old code... - PR Comment: https://git.openjdk.org/jdk/pull

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-04 Thread Weijun Wang
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-04 Thread Daniel Jeliński
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-04 Thread Daniel Jeliński
On Wed, 4 Oct 2023 04:08:13 GMT, Julian Waters wrote: >> I tested the new approach on gcc, it worked, so I'll commit it here > > I've changed it to use the split approach, but this feels like a hack to me. > I wonder if there's a better way of doing this? well goto was always a hack; less hacky

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-03 Thread Julian Waters
On Tue, 3 Oct 2023 02:47:02 GMT, Julian Waters wrote: >> Well, SO offers a speculative answer: >> https://stackoverflow.com/a/14274292 >> the modified form is not more safe, but the standard does not forbid it. > > I tested the new approach on gcc, it worked, so I'll commit it here I've changed

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-03 Thread Julian Waters
On Tue, 3 Oct 2023 14:13:14 GMT, Weijun Wang wrote: > I'm OK with the fix. So separating the declaration and the assignment > effectively place all the declarations at the beginning of the block and give > them default values? It doesn't place them at the start of the block, the difference is

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-03 Thread Weijun Wang
On Tue, 3 Oct 2023 02:55:09 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v2]

2023-10-02 Thread Julian Waters
On Tue, 3 Oct 2023 02:29:28 GMT, Julian Waters wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as the

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-02 Thread Julian Waters
On Mon, 2 Oct 2023 12:27:17 GMT, Daniel Jeliński wrote: >> I agree that it's ugly, but at the time I couldn't think of another way to >> solve the issue. By any chance, why does splitting it out into separate >> declaration assignment work? Last I remember, it still jumps over the local >> eve

Re: RFR: 8317332: Prepare security for permissive- [v3]

2023-10-02 Thread Julian Waters
> Prepares java.security.jgss for the permissive- compiler switch by > > - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp > - Adding a static modifier to a mismatched method declaration in > NativeCreds.c, as the definition is static Julian Waters has updated the pull req

Re: RFR: 8317332: Prepare security for permissive- [v2]

2023-10-02 Thread Julian Waters
> Prepares java.security.jgss for the permissive- compiler switch by > > - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp > - Adding a static modifier to a mismatched method declaration in > NativeCreds.c, as the definition is static Julian Waters has updated the pull req

Re: RFR: 8317332: Prepare security for permissive-

2023-10-02 Thread Daniel Jeliński
On Mon, 2 Oct 2023 08:19:54 GMT, Julian Waters wrote: >> src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp line 372: >> >>> 370: SEC_WCHAR* value = new SEC_WCHAR[len + 1]; >>> 371: >>> 372: { >> >> This is ugly. I'm not a fan of braces appearing in the middle of the code >

Re: RFR: 8317332: Prepare security for permissive-

2023-10-02 Thread Julian Waters
On Mon, 2 Oct 2023 07:57:57 GMT, Daniel Jeliński wrote: >> Prepares java.security.jgss for the permissive- compiler switch by >> >> - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp >> - Adding a static modifier to a mismatched method declaration in >> NativeCreds.c, as t

Re: RFR: 8317332: Prepare security for permissive-

2023-10-02 Thread Daniel Jeliński
On Sat, 30 Sep 2023 06:26:10 GMT, Julian Waters wrote: > Prepares java.security.jgss for the permissive- compiler switch by > > - Adding scopes so goto doesn't jump over unitialized locals in sspi.cpp > - Adding a static modifier to a mismatched method declaration in > NativeCreds.c, as the def