RE: Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java?

2020-02-13 Thread Patrick Zhang OS
not worth the overhead. Roger On 2/13/20 10:34 AM, Patrick Zhang OS wrote: > Hi, > > A quick question, > I read the code snippets of indexOf(String str), found indexOfUnsafe [1] and > indexOfLatin1Unsafe [2] have different access control, but it looks both > should be priva

Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java?

2020-02-13 Thread Patrick Zhang OS
Hi, A quick question, I read the code snippets of indexOf(String str), found indexOfUnsafe [1] and indexOfLatin1Unsafe [2] have different access control, but it looks both should be private. Did I miss any outer caller or any other restriction? Thanks for your comment. [1] private static int i

RE: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10

2020-02-07 Thread Patrick Zhang OS
-libs-dev@openjdk.java.net Subject: Re: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 +1, One is enough, but additional eyes are good too. On 2/5/20 10:35 PM, Patrick Zhang OS wrote: > Does this require one more “yes” f

RE: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10

2020-02-05 Thread Patrick Zhang OS
Does this require one more “yes” from any other reviewer? And may I ask for any committer’s help to sponsor and push it (once approved)? Thanks in advance. Regards Patrick From: Thomas Stüfe Sent: Wednesday, February 5, 2020 11:16 PM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR

RE: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10

2020-02-05 Thread Patrick Zhang OS
change a bit (the header comments): http://cr.openjdk.java.net/~qpzhang/8238380/webrev.02/ Regards Patrick From: Thomas Stüfe Sent: Wednesday, February 5, 2020 2:30 PM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "mul

RE: RFR: JDK-8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10

2020-02-04 Thread Patrick Zhang OS
...@google.com>> Sent: Monday, December 16, 2019 10:44 AM To: Patrick Zhang OS mailto:patr...@os.amperecomputing.com>>; net-dev mailto:net-...@openjdk.java.net>>; OpenJDK mailto:security-...@openjdk.java.net>> Cc: core-libs-dev mailto:core-libs-dev@openjdk.java.net>>

RE: RFR: JDK-8235903: GCC default -fno-common exposes "multiple definition" link errors

2019-12-16 Thread Patrick Zhang OS
://bugs.openjdk.java.net/browse/JDK-8235903 Webrev: http://cr.openjdk.java.net/~qpzhang/8235903/webrev.01/ Regards Patrick From: Martin Buchholz Sent: Monday, December 16, 2019 10:44 AM To: Patrick Zhang OS ; net-dev ; OpenJDK Cc: core-libs-dev Subject: Re: RFR: JDK-8235903: GCC default -fno-common exposes

RFR: JDK-8235903: GCC default -fno-common exposes "multiple definition" link errors

2019-12-13 Thread Patrick Zhang OS
Hi Please review this patch, if it should be reviewed by any group other than core-libs, please help forward it. Thanks. JBS: https://bugs.openjdk.java.net/browse/JDK-8235903 Webrev: http://cr.openjdk.java.net/~qpzhang/8235903/webrev.01/ A recent GCC patch (supposed to be in GCC 10) exposes a

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-08 Thread Patrick Zhang OS
level javadoc for modCount, or for "fail fast". Regards Patrick -Original Message- From: Stuart Marks Sent: Thursday, May 9, 2019 5:01 AM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called con

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-05-04 Thread Patrick Zhang OS
d (or unreliable) operation, perhaps I should drop all of them. Lastly, a suggestion would be: adding more comments for this in case anyone else would revisit it with similar confusions, e.g. HashMap.clear. Regards Patrick -Original Message- From: Stuart Marks Sent: Thursday, May 2

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-24 Thread Patrick Zhang OS
esting. Clear, compute, and computeIfAbsent are more special as I described. Regards Patrick -Original Message- From: Stuart Marks Sent: Thursday, April 25, 2019 7:48 AM To: Patrick Zhang OS Cc: core-libs-dev ; Martin Buchholz Subject: Re: RFR(trivial): 8222394: HashMap.compute() throws

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-16 Thread Patrick Zhang OS
Done. http://cr.openjdk.java.net/~qpzhang/8222334/webrev.05 Regards Patrick -Original Message- From: David Holmes Sent: Tuesday, April 16, 2019 6:34 PM To: Patrick Zhang OS Cc: core-libs-dev Subject: Re: RFR: 8222334: java -Xss0 triggers StackOverflowError Hi Patrick, On 16/04

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-16 Thread Patrick Zhang OS
day, April 16, 2019 4:17 PM To: Patrick Zhang OS Cc: Alan Bateman ; core-libs-dev Subject: Re: RFR: 8222334: java -Xss0 triggers StackOverflowError Patrick, Sorry should have picked up on this earlier. Can you please update the following two tests to add a test for '0' as appro

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-16 Thread Patrick Zhang OS
Sure I will add this, and fix the intention mentioned by Alan. Regards Patrick -Original Message- From: David Holmes Sent: Tuesday, April 16, 2019 4:17 PM To: Patrick Zhang OS Cc: Alan Bateman ; core-libs-dev Subject: Re: RFR: 8222334: java -Xss0 triggers StackOverflowError Patrick

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-15 Thread Patrick Zhang OS
y rigorous, we might need this: http://cr.openjdk.java.net/~qpzhang/8222394/webrev.02 for compute()/computeIfAbsent(). Centainly I know it has to afford the risk of missing bugs. Regards Patrick -Original Message- From: Stuart Marks Sent: Saturday, April 13, 2019 4:15 AM To: Patrick Zhang

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-15 Thread Patrick Zhang OS
Removed it. http://cr.openjdk.java.net/~qpzhang/8222334/webrev.03/jdk.changeset By the way, could you please sponsor to push it once approved? thanks in advance. Regards Patrick -Original Message- From: David Holmes Sent: Monday, April 15, 2019 2:33 PM To: Patrick Zhang OS ; core

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-14 Thread Patrick Zhang OS
rds Patrick -----Original Message- From: David Holmes Sent: Monday, April 15, 2019 6:55 AM To: Patrick Zhang OS ; core-libs-dev Subject: Re: RFR: 8222334: java -Xss0 triggers StackOverflowError Hi Patrick, Please see: http://cr.openjdk.java.net/~dholmes/8222334/webrev/ for my suggested updat

RE: RFR(trivial): 8222394: HashMap.compute() throws CME on an empty Map if clear() called concurrently

2019-04-12 Thread Patrick Zhang OS
Created a ticket to track it, welcome any comments. Thanks. JBS https://bugs.openjdk.java.net/browse/JDK-8222394 Webrev: http://cr.openjdk.java.net/~qpzhang/map.clear/webrev.01 Regards Patrick -Original Message- From: core-libs-dev On Behalf Of Patrick Zhang OS Sent: Saturday, March

RE: RFR: 8222334: java -Xss0 triggers StackOverflowError

2019-04-12 Thread Patrick Zhang OS
Moved this to core-libs-dev for review, thanks. Dropped and bcc'ed jdk-dev and jdk-updates-dev. Regards Patrick -Original Message- From: David Holmes Sent: Friday, April 12, 2019 3:43 PM To: Patrick Zhang OS ; jdk-...@openjdk.java.net Cc: jdk-updates-...@openjdk.java.net Subjec

ConcurrentModificationException thrown by HashMap.compute() operating on an empty Map, expected/unexpected?

2019-03-29 Thread Patrick Zhang OS
Hi, Here I have a case simplified from a practical issue that throws ConcurrentModificationException (CME) unexpectedly (I think). [0] creates a HashMap, keeps it empty, and calls m.computeIfAbsent() or m.compute(), in which a "sneaky" m.clear() occurs, some of the test cases throw CME although

RE: JDK-8210280 - Unnecessary reallocation when invoking HashMap.putAll()

2019-01-29 Thread Patrick Zhang
This is a nice patch as I found the same problem back to December. Privately I was using "(size + s > threshold)" condition for my cases, and found Michal's early comment that this would lead to "unwanted space allocation" caused by duplicate keys, thanks. Looking forward to having this in jdk/

RE: 8215976: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-22 Thread Patrick Zhang
Appreciate all your kind help in making it happen. Regards Patrick From: Roger Riggs Sent: Tuesday, January 22, 2019 10:56 PM To: David Holmes ; Patrick Zhang Cc: core-libs-dev Subject: Re: 8215976: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot

RE: 8215976: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-21 Thread Patrick Zhang
Riggs Sent: Wednesday, January 16, 2019 11:07 PM To: Alan Bateman ; Patrick Zhang ; David Holmes Cc: core-libs-dev Subject: Re: 8215976: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path Hi, I can sponsor this. Let me know when the jdk-submit is

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-15 Thread Patrick Zhang
+ * For thread-safe reasons, non-Windows platforms need gmtime_r + * while Windows can directly use gmtime that is already thread-safe. + */ +#ifdef _MSC_VER #define gmtime_r(t, s) gmtime(t) #endif /* Regards Patrick -Original Message- From: core-libs-dev On Behalf Of Patrick Zhang Sent:

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-15 Thread Patrick Zhang
Re-generated the patch in pure text using “hg export -o” instead of webrev, perhaps this could work (see attached please). Comments had been updated as well according to David’s input. Thanks Regards Patrick From: Roger Riggs Sent: Tuesday, January 15, 2019 11:26 PM To: Patrick Zhang Cc: core

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-15 Thread Patrick Zhang
mtime_r(t, s) gmtime(t) #endif /* * Return the Unix time in DOS format */ Regards Patrick -Original Message- From: core-libs-dev On Behalf Of Patrick Zhang Sent: Tuesday, January 15, 2019 4:57 PM To: Roger Riggs Cc: core-libs-dev Subject: RE: OpenJDK fails to buil

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-15 Thread Patrick Zhang
_VER" at line 36. Thanks, Roger On 01/14/2019 09:02 AM, Magnus Ihse Bursie wrote: On 2019-01-02 00:11, David Holmes wrote: Hi Patrick, On 13/12/2018 1:23 pm, Patrick Zhang wrote: Ping... Apply for a sponsor for this simple patch. Seems no one wants to own this one :( For what it&

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2019-01-03 Thread Patrick Zhang
ary 2, 2019 7:11 AM To: Patrick Zhang ; core-libs-dev@openjdk.java.net Cc: Florian Weimer Subject: Re: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path Hi Patrick, On 13/12/2018 1:23 pm, Patrick Zhang wrote: > Ping... > > Apply for a sponso

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2018-12-12 Thread Patrick Zhang
Ping... Apply for a sponsor for this simple patch. I doubt if I could have permission to file the issue/bug report anywhere, could anyone kindly give a guidance? Thanks. Regards Patrick -Original Message- From: core-libs-dev On Behalf Of Patrick Zhang Sent: Thursday, December 6

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2018-12-06 Thread Patrick Zhang
To All, Who could help sponsor this simple patch (may require a wide range of building tests)? Thanks in advance. Regards Patrick -Original Message- From: David Holmes Sent: Monday, December 3, 2018 8:11 AM To: Patrick Zhang ; Florian Weimer Cc: core-libs-dev@openjdk.java.net

RE: OpenJDK fails to build with GCC when the #include inside zip.cpp comes from a non-sysroot path

2018-11-30 Thread Patrick Zhang
ly place where _REENTRANT gets used AFAIK. #ifdef _MSC_VER // Windows #define gmtime_r(t, s) gmtime(t) #endif Regards Patrick -Original Message- From: Florian Weimer Sent: Thursday, November 29, 2018 8:02 PM To: David Holmes Cc: Patrick Zhang ; jdk-...@openjdk.java.net; core-libs-dev@op

Re: RFR for JDK-8027973. javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java hangs (win)

2013-11-21 Thread Patrick Zhang
Hi Alan, I have renamed "jdk8004476" to "8004476". And as Daniel's suggestion, add some comments to XSLTExFuncTest.java. I have updated the webrev for review. http://cr.openjdk.java.net/~pzhang/8027973/webrev/ Regards Patrick On 11/21/13 5:33 PM, Alan Bateman wrote: On 21/11/2013 05:20, hui

RFR for JDK-8027973. javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java hangs (win)

2013-11-20 Thread Patrick Zhang
Hi Everyone, I am working on https://bugs.openjdk.java.net/browse/JDK-8027973. The problem is caused by wrong URL format on windows. file://c:\xxx is one invalid schema. Solution: Replace "file://" with "file:///" then it will work on windows and it will not impact other platforms. And remov

RFR for JDK-8016519. closed/javax/xml/ws/8005432/TestProxyCreation.java uses fixed port to publish webservice

2013-11-12 Thread Patrick Zhang
Hi Everyone, I am working on https://bugs.openjdk.java.net/browse/JDK-8016519. The test uses fixed port(8080) to publish webservice and it will fail periodically when the port has been occupied by other tests or applications. The fix will use new InetSocketAddress(0).getPort() to retrieve o

Re: RFR for JDK-8019502 some java.util test does not pass VM options when launching java program in script

2013-11-08 Thread Patrick Zhang
Hi Alan, I have created https://bugs.openjdk.java.net/browse/JDK-8028044 to hold it. Regards Patrick On 11/8/13 5:24 PM, Alan Bateman wrote: On 08/11/2013 03:41, Patrick Zhang wrote: Sorry, I have some problems to connect to cr.openjdk.java.net yesterday. Now the webrev and result are

Re: RFR for JDK-8019502 some java.util test does not pass VM options when launching java program in script

2013-11-07 Thread Patrick Zhang
://cr.openjdk.java.net/~pzhang/8019502/webrev/ result: http://cr.openjdk.java.net/~pzhang/8019502/GenericTimeZoneNamesTest.jtr http://cr.openjdk.java.net/~pzhang/8019502/NarrowNamesTest.jtr Regards Patrick On 11/7/13 5:07 PM, Alan Bateman wrote: On 07/11/2013 03:48, Patrick Zhang wrote: Hi Everyone, I am

RFR for JDK-8019502 some java.util test does not pass VM options when launching java program in script

2013-11-06 Thread Patrick Zhang
Hi Everyone, I am working on https://bugs.openjdk.java.net/browse/JDK-8019502. The problem is, some java.util test does use ${TESTVMOPTS} to launch java program in script. Then it may lose VM setting from high level. The fix will refer to https://bugs.openjdk.java.net/browse/JDK-8003890 fini

Auto Reply: core-libs-dev Digest, Vol 53, Issue 40

2011-09-29 Thread patrick . zhang
I will be out of office from Sep 29th to Oct 7th. Any emergency please contact with my manager sandeep.konch...@oracle.com. Or you can get to me through +86 10 13341050230 directly.