Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-06 Thread Chris Plummer
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in >

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 03:19:51 GMT, Ioi Lam wrote: > > Given that this seems to be a common problem in our code, and likely a very > > very old problem at that, why has it never been reported before? I'm not > > questioning the fix except to the extent that I'm questioning our > > understanding

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 03:07:49 GMT, Chris Plummer wrote: > Given that this seems to be a common problem in our code, and likely a very > very old problem at that, why has it never been reported before? I'm not > questioning the fix except to the extent that I'm questioning our > understanding of

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Tue, 5 Jan 2021 02:40:29 GMT, Yasumasa Suenaga wrote: >> Marked as reviewed by iklam (Reviewer). > > @iklam Thanks for your review! > >> I looked at a cases in the JDK code where >> `Java_sun_security_pkcs11_wrapper_PKCS11_connect()` calls `FormatMessage()`. >> It eventually passes the

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 02:19:37 GMT, Ioi Lam wrote: >> I got garbled exception message as following when I run `livenmethods` >> CLHSDB command: >> >> sun.jvm.hotspot.debugger.DebuggerException : ?w???W >> >> My Windows laptop is set Japanese Locale, garbled message was written in >>

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 01:31:28 GMT, Chris Plummer wrote: > > jdk.hotspot.agent do not have `FormatMessage()` call in other place. > > Did you say about whole JDK code? I haven't checked all of them, but some > > code (e.g. net_util_md.c) uses `JNU_ThrowByName()` which is provided by > > java.dll.

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in >

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 01:30:07 GMT, Ioi Lam wrote: > Now the saproc DLL has an external reference to getLastErrorString, > JNU_NewStringPlatform and JNU_NewObjectByName on all platforms. Do we need to > modify the makefiles for platforms other than Windows? @iklam Agree, so I added `LIBS_unix :=

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 00:41:11 GMT, Yasumasa Suenaga wrote: >> There are probably 25 or so places in our code where we use FormatMessage to >> get the error message. Are these all going to run into the same >> FormateMessage bug? >> >> Also, it's not clear to me why you are getting garbled text

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Tue, 5 Jan 2021 00:41:11 GMT, Yasumasa Suenaga wrote: > jdk.hotspot.agent do not have `FormatMessage()` call in other place. > Did you say about whole JDK code? I haven't checked all of them, but some > code (e.g. net_util_md.c) uses `JNU_ThrowByName()` which is provided by > java.dll.

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Mon, 4 Jan 2021 21:06:46 GMT, Chris Plummer wrote: > There are probably 25 or so places in our code where we use FormatMessage to > get the error message. Are these all going to run into the same > FormateMessage bug? jdk.hotspot.agent do not have `FormatMessage()` call in other place. Did

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Mon, 4 Jan 2021 20:58:59 GMT, Chris Plummer wrote: >> I got garbled exception message as following when I run `livenmethods` >> CLHSDB command: >> >> sun.jvm.hotspot.debugger.DebuggerException : ?w???W >> >> My Windows laptop is set Japanese Locale, garbled message was written in >>

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in >

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Erik Joelsson
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in >

RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
I got garbled exception message as following when I run `livenmethods` CLHSDB command: sun.jvm.hotspot.debugger.DebuggerException : ?w???W My Windows laptop is set Japanese Locale, garbled message was written in Japanese. saproc.dll would throw exception via