Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v3]

2021-03-18 Thread Sergey Bylokhov
On Wed, 17 Mar 2021 00:57:24 GMT, Henry Jen wrote: >> This patch ensure launcher won't crash JVM for the new static Methods from >> local/anonymous class on MacOS. >> >> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug >> when the launcher trying to grab class name to

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v3]

2021-03-17 Thread Henry Jen
On Wed, 17 Mar 2021 08:55:54 GMT, Alan Bateman wrote: > > > Using an anonymous class for the main class looks strange and hard to > > > believe anyone is relying on this. I wonder if we should do more checking > > > LauncherHelper.validateMainClass to reject cases like this. > > > > > > I

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v3]

2021-03-17 Thread Alan Bateman
On Tue, 16 Mar 2021 17:49:42 GMT, Henry Jen wrote: > > Using an anonymous class for the main class looks strange and hard to > > believe anyone is relying on this. I wonder if we should do more checking > > LauncherHelper.validateMainClass to reject cases like this. > > I raised that same

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread David Holmes
On 16/03/2021 2:59 pm, David Holmes wrote: On 16/03/2021 11:58 am, Sergey Bylokhov wrote: On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen wrote: This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS. As @dholmes-ora pointed out in the

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v3]

2021-03-16 Thread Henry Jen
> This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be displayed as the > Application name on the menu. > >

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v2]

2021-03-16 Thread Sergey Bylokhov
On Tue, 16 Mar 2021 17:39:34 GMT, Henry Jen wrote: >> test/jdk/tools/launcher/8261785/CrashTheJVM.java line 1: >> >>> 1: import java.io.IOException; >> >> Copyright? > > This file is mostly based on the bug report as I just adjust static keyword > to make sure we cover different cases, thus I

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v2]

2021-03-16 Thread Henry Jen
> This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be displayed as the > Application name on the menu. > >

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Henry Jen
On Tue, 16 Mar 2021 15:33:37 GMT, Alan Bateman wrote: > Using an anonymous class for the main class looks strange and hard to believe > anyone is relying on this. I wonder if we should do more checking > LauncherHelper.validateMainClass to reject cases like this. I raised that same question,

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Henry Jen
On Tue, 16 Mar 2021 01:59:33 GMT, Sergey Bylokhov wrote: >> This patch ensure launcher won't crash JVM for the new static Methods from >> local/anonymous class on MacOS. >> >> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug >> when the launcher trying to grab class

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Alan Bateman
On Tue, 16 Mar 2021 07:43:54 GMT, Sergey Bylokhov wrote: >> This bug is similar to https://bugs.openjdk.java.net/browse/JDK-8076264, and >> the fix looks fine. > >> Maybe the AWT folk should decide what name should be displayed in this >> case. The canonical name was chosen when all main

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Sergey Bylokhov
On Tue, 16 Mar 2021 01:55:49 GMT, Sergey Bylokhov wrote: >> This patch ensure launcher won't crash JVM for the new static Methods from >> local/anonymous class on MacOS. >> >> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug >> when the launcher trying to grab class

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-15 Thread David Holmes
On 16/03/2021 11:58 am, Sergey Bylokhov wrote: On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen wrote: This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS. As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug when the

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-15 Thread Sergey Bylokhov
On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen wrote: > This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-15 Thread Sergey Bylokhov
On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen wrote: > This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-14 Thread David Holmes
Hi Henry, On 15/03/2021 9:40 am, Henry Jen wrote: This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS. As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug when the launcher trying to grab class name to be displayed

RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-14 Thread Henry Jen
This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS. As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug when the launcher trying to grab class name to be displayed as the Application name on the menu. The fix is to